You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
536 B
24 lines
536 B
package com.xsn.explorer.util
|
|
|
|
import org.scalatest.{MustMatchers, WordSpec}
|
|
|
|
class BigDecimalExtSpec extends WordSpec with MustMatchers {
|
|
|
|
import Extensions.BigDecimalExt
|
|
|
|
"fromSatoshis" should {
|
|
"work" in {
|
|
val input = BigDecimal(40409891838L)
|
|
val result = input.fromSatoshis
|
|
result mustEqual BigDecimal(404.09891838)
|
|
}
|
|
}
|
|
|
|
"toSatoshis" should {
|
|
"work" in {
|
|
val input = BigDecimal(404.09891838)
|
|
val result = input.toSatoshis
|
|
result mustEqual BigDecimal(40409891838L)
|
|
}
|
|
}
|
|
}
|
|
|