Reformat.
This commit is contained in:
parent
a7ec86d274
commit
2521edba46
1 changed files with 10 additions and 11 deletions
|
@ -33,17 +33,16 @@ package net.thauvin.erik.pinboard
|
||||||
|
|
||||||
import org.testng.Assert
|
import org.testng.Assert
|
||||||
import org.testng.annotations.Test
|
import org.testng.annotations.Test
|
||||||
import java.io.FileInputStream
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
import java.util.Properties
|
import java.util.*
|
||||||
|
|
||||||
class PinboardPosterTest {
|
class PinboardPosterTest {
|
||||||
private val url = "http://www.foo.com/"
|
private val url = "http://www.foo.com/"
|
||||||
private val desc = "This is a test."
|
private val desc = "This is a test."
|
||||||
private val localProps = Paths.get("local.properties")
|
private val localProps = Paths.get("local.properties")
|
||||||
private val apiToken = if (Files.exists(localProps)) {
|
private val apiToken = if (Files.exists(localProps)) {
|
||||||
val p = Properties().apply { Files.newInputStream(localProps).use { fis -> load(fis) }}
|
val p = Properties().apply { Files.newInputStream(localProps).use { fis -> load(fis) } }
|
||||||
p.getProperty("pinboard-api-token", "")
|
p.getProperty("pinboard-api-token", "")
|
||||||
} else {
|
} else {
|
||||||
System.getenv("PINBOARD_API_TOKEN")
|
System.getenv("PINBOARD_API_TOKEN")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue