Add test source junit 5 and updated the exception
This commit is contained in:
17
src/test/kotlin/MoneyTests.kt
Normal file
17
src/test/kotlin/MoneyTests.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
import com.cubetiqs.libra.moneyutils.Money
|
||||
import com.cubetiqs.libra.moneyutils.plus
|
||||
import com.cubetiqs.libra.moneyutils.times
|
||||
import com.cubetiqs.libra.moneyutils.timesAssign
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
|
||||
class MoneyTests {
|
||||
@Test
|
||||
fun test() {
|
||||
val money = Money(10.0)
|
||||
val money2 = Money(20.0)
|
||||
money *= money
|
||||
println((money + money2) * money2)
|
||||
Assert.assertEquals(10, 10)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user