Skip to content

Commit

Permalink
Working on tests for number fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Feb 3, 2024
1 parent 6128f98 commit 7014d6b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import java.math.BigDecimal
import java.math.BigInteger

class JsonCadenceBuilderNumberFieldTest {

@Test
fun `Test creating NumberField with valid values`() {
val intField = NumberField(TYPE_INT, "42")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class JsonCadenceBuilderUFix64NumberFieldTest {

@Test
fun `Test decoding of UFix64NumberField`() {
val ufix64Field = UFix64NumberField("123.456")
Expand Down Expand Up @@ -45,6 +44,3 @@ class JsonCadenceBuilderUFix64NumberFieldTest {
.isInstanceOf(NumberFormatException::class.java)
}
}



Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class JsonCadenceBuilderUInt64NumberFieldTest {

@Test
fun `Test decoding of UInt64NumberField with valid value`() {
val uint64Field = UInt64NumberField("12345678901234567890")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class JsonCadenceBuilderUInt8NumberFieldTest {
assertEquals("42", uint8Field.value)
}

@Test
fun `Test decoding of UInt8NumberField with maximum value`() {
val uint8Field = UInt8NumberField("255")
assertEquals(255U, uint8Field.decodeToAny())
}

@Test
fun `Test hashCode on UInt8NumberField`() {
val uint8Field1 = UInt8NumberField("123")
Expand Down

0 comments on commit 7014d6b

Please sign in to comment.