tras convertir mi código de Java a Kotlin desde la página de Try Kotlin, me sale el siguiente error:
error: none of the following functions can be called with the arguments supplied: public open fun assertEquals(p0: Double, p1: Double, p2: Double): Unit defined in org.junit.Assert public open fun assertEquals(p0: Float, p1: Float, p2: Float): Unit defined in org.junit.Assert public open fun assertEquals(p0: String!, p1: Any!, p2: Any!): Unit defined in org.junit.Assert @Deprecated public open fun assertEquals(p0: String!, p1: Array<(out) Any!>!, p2: Array<(out) Any!>!): Unit defined in org.junit.Assert @Deprecated public open fun assertEquals(p0: String!, p1: Double, p2: Double): Unit defined in org.junit.Assert public open fun assertEquals(p0: String!, p1: Long, p2: Long): Unit defined in org.junit.Assert assertEquals(7, UnwantedDollars.moneyValue("007"), 1e-9) ^
Código convertido:
package com.codewars.geoffp
import org.junit.Test
import org.junit.Assert.*
class UnwantedDollarsTest {
@Test
fun moneyValue() {
assertEquals(12.34, UnwantedDollars.moneyValue("12.34"), 1e-9)
assertEquals(5.67, UnwantedDollars.moneyValue(" $5.67"), 1e-9)
assertEquals(-0.89, UnwantedDollars.moneyValue("-0.89"), 1e-9)
assertEquals(-0.10, UnwantedDollars.moneyValue("-$ 0.1"), 1e-9)
assertEquals(-2.3456, UnwantedDollars.moneyValue("$-2.3456"), 1e-9)
assertEquals(7, UnwantedDollars.moneyValue("007"), 1e-9)
assertEquals(89.0, UnwantedDollars.moneyValue(" $ 89"), 1e-9)
assertEquals(0.11, UnwantedDollars.moneyValue(" .11"), 1e-9)
assertEquals(0.20, UnwantedDollars.moneyValue("$.2"), 1e-9)
assertEquals(-0.34, UnwantedDollars.moneyValue("-.34"), 1e-9)
assertEquals(0.0, UnwantedDollars.moneyValue("$$$"), 1e-9)
}
}
¿Cómo puedo solucionarlo?