MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / modifyInt

Method modifyInt

src/test/java/com/amazon/ion/IntTest.java:45–61  ·  view source on GitHub ↗
(IonInt value)

Source from the content-addressed store, hash-verified

43
44
45 public void modifyInt(IonInt value)
46 {
47 assertSame(IonType.INT, value.getType());
48 value.setValue(123);
49 assertFalse(value.isNullValue());
50 assertEquals(123, value.intValue());
51 assertEquals(123L, value.longValue());
52 assertEquals(BigInteger.valueOf(123), value.bigIntegerValue());
53
54 value.setValue(A_LONG_INT);
55 assertEquals(A_LONG_INT, value.longValue());
56 assertEquals(BigInteger.valueOf(A_LONG_INT), value.bigIntegerValue());
57 assertEquals(BigDecimal.valueOf(A_LONG_INT), value.bigDecimalValue());
58
59 value.setValue(null);
60 checkNullInt(value);
61 }
62
63
64 //=========================================================================

Callers 4

testFactoryIntMethod · 0.95
testTextNullIntMethod · 0.95
testIntsMethod · 0.95
testLongsMethod · 0.95

Calls 10

checkNullIntMethod · 0.95
getTypeMethod · 0.65
setValueMethod · 0.65
isNullValueMethod · 0.65
intValueMethod · 0.65
longValueMethod · 0.65
bigIntegerValueMethod · 0.65
bigDecimalValueMethod · 0.65
assertEqualsMethod · 0.45
valueOfMethod · 0.45

Tested by

no test coverage detected