From 4209cb83c5c51dee3043468bb80f979ab0660ddf Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 9 May 2021 16:15:22 -0700 Subject: [PATCH] Cleanup. --- .idea/misc.xml | 3 +++ .../kotlin/net/thauvin/erik/crypto/CryptoPrice.kt | 2 +- .../net/thauvin/erik/crypto/CryptoPriceTest.kt | 12 ++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 0474152..5583949 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -2,4 +2,7 @@ + + \ No newline at end of file diff --git a/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt b/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt index 20a76f3..20af110 100644 --- a/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt +++ b/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt @@ -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 { diff --git a/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt b/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt index abd23c6..b8f3a61 100644 --- a/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt +++ b/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt @@ -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 {