Cleanup.
This commit is contained in:
parent
3ad86b3354
commit
4209cb83c5
3 changed files with 10 additions and 7 deletions
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
@ -2,4 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="15" project-jdk-type="JavaSDK" />
|
||||
<component name="SuppressKotlinCodeStyleNotification">
|
||||
<option name="disableForAll" value="true" />
|
||||
</component>
|
||||
</project>
|
|
@ -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