Cleanup.
This commit is contained in:
parent
3ad86b3354
commit
4209cb83c5
3 changed files with 10 additions and 7 deletions
|
@ -53,7 +53,7 @@ open class CryptoPrice(val base: String, val currency: String, val amount: Doubl
|
|||
if (json.has("data")) {
|
||||
with(json.getJSONObject("data")) {
|
||||
return CryptoPrice(
|
||||
getString("base"), getString("currency"), getString("amount").toDouble()
|
||||
getString("base"), getString("currency"), getString("amount").toDouble()
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -52,15 +52,15 @@ class CryptoPriceTest {
|
|||
@Throws(CryptoException::class)
|
||||
fun testMarketPriceExceptions() {
|
||||
assertFailsWith(
|
||||
message = "FOO did not fail",
|
||||
exceptionClass = CryptoException::class,
|
||||
block = { marketPrice("FOO") }
|
||||
message = "FOO did not fail",
|
||||
exceptionClass = CryptoException::class,
|
||||
block = { marketPrice("FOO") }
|
||||
)
|
||||
|
||||
assertFailsWith(
|
||||
message = "BAR did not fail",
|
||||
exceptionClass = CryptoException::class,
|
||||
block = { marketPrice("BTC", "BAR") }
|
||||
message = "BAR did not fail",
|
||||
exceptionClass = CryptoException::class,
|
||||
block = { marketPrice("BTC", "BAR") }
|
||||
)
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue