diff --git a/.idea/cryptoprice.iml b/.idea/cryptoprice.iml
deleted file mode 100644
index d6ebd48..0000000
--- a/.idea/cryptoprice.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index d3ae3bd..46f5ce8 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -3,13 +3,8 @@
-
-
-
-
-
-
-
+
+
@@ -21,6 +16,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml
new file mode 100644
index 0000000..bc444de
--- /dev/null
+++ b/.idea/kotlinScripting.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5583949..7546138 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,14 @@
+
+
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index e18fafb..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index de43e50..7894c3b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -99,8 +99,8 @@ tasks {
jacocoTestReport {
dependsOn(test)
reports {
- xml.isEnabled = true
- html.isEnabled = true
+ xml.required.set(true)
+ html.required.set(true)
}
}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index e708b1c..7454180 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0f80bbf..69a9715 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 4f906e0..744e882 100755
--- a/gradlew
+++ b/gradlew
@@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
- MINGW* )
+ MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
diff --git a/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt b/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt
index f128878..e4dfaba 100644
--- a/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt
+++ b/src/main/kotlin/net/thauvin/erik/crypto/CryptoPrice.kt
@@ -172,13 +172,13 @@ open class CryptoPrice(val base: String, val currency: String, val amount: BigDe
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
-
+
other as CryptoPrice
-
+
if (base != other.base) return false
if (currency != other.currency) return false
if (amount != other.amount) return false
-
+
return true
}
@@ -208,10 +208,10 @@ open class CryptoPrice(val base: String, val currency: String, val amount: BigDe
val json = JSONStringer()
if (key.isNotBlank()) json.`object`().key(key)
json.`object`()
- .key("base").value(base)
- .key("currency").value(currency)
- .key("amount").value(amount.toString())
- .endObject()
+ .key("base").value(base)
+ .key("currency").value(currency)
+ .key("amount").value(amount.toString())
+ .endObject()
if (key.isNotBlank()) json.endObject()
return json.toString()
}
diff --git a/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt b/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt
index a61c425..d85318a 100644
--- a/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt
+++ b/src/test/kotlin/net/thauvin/erik/crypto/CryptoPriceTest.kt
@@ -125,7 +125,7 @@ class CryptoPriceTest {
val data = jsonData.format(d)
with(data.toPrice()) {
assertEquals(data, toJson(), "toJson($d)")
- assertEquals(data.replace("data","price$i"), toJson("price$i"), "toJson(price$i)")
+ assertEquals(data.replace("data", "price$i"), toJson("price$i"), "toJson(price$i)")
}
}
}
@@ -143,7 +143,7 @@ class CryptoPriceTest {
assertEquals(price, price.toString().toPrice(""), "toPrice('')")
assertEquals(price, price.toJson("test").toPrice("test"), "toPrice(test)")
-
+
assertFailsWith(
message = "amount conversion did not fail",
exceptionClass = CryptoException::class,
@@ -165,7 +165,7 @@ class CryptoPriceTest {
@Test
fun testToString() {
- val json = jsonPrice.format("1234.5")
+ val json = jsonPrice.format("1234.5")
val price = json.toPrice("")
assertEquals(json, price.toString(), "toString()")
assertEquals(price.toString(), price.toJson(""), "toString() = toJson('')")