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

Method testPutNull

src/test/java/com/amazon/ion/StructTest.java:536–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534 }
535
536 @Test
537 public void testPutNull()
538 {
539 IonStruct value = system().newNullStruct();
540 value.put("f", null);
541 assertTrue(value.isNullValue());
542
543 value.clear();
544 value.put("f", null);
545 assertTrue(value.isEmpty());
546
547 value.put("f", system().newInt(1));
548 value.put("f", null);
549 assertTrue(value.isEmpty());
550
551 value.put("g", system().newInt(1));
552 value.put("f", null);
553 assertEquals(1, value.size());
554
555 value.add("f", system().newInt(2));
556 value.add("f", system().newInt(3));
557 value.put("f", null);
558 assertEquals(1, value.size());
559
560 testMultithreadedAccess(value);
561 }
562
563 @Test
564 public void testBadPuts()

Callers

nothing calls this directly

Calls 11

putMethod · 0.95
sizeMethod · 0.95
addMethod · 0.95
newNullStructMethod · 0.65
isNullValueMethod · 0.65
clearMethod · 0.65
isEmptyMethod · 0.65
newIntMethod · 0.65
systemMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected