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

Method testStructs

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

Source from the content-addressed store, hash-verified

264 }
265
266 @Test
267 public void testStructs()
268 {
269 IonStruct value = (IonStruct) oneValue("{a:b}");
270 assertEquals(1, value.size());
271 IonSymbol fieldA = (IonSymbol) value.get("a");
272 assertEquals("a", fieldA.getFieldName());
273 assertEquals("b", fieldA.stringValue());
274 assertNull(value.get("not"));
275 assertEquals("{a:b}", value.toString());
276 }
277
278
279 /**

Callers

nothing calls this directly

Calls 7

sizeMethod · 0.95
getMethod · 0.95
stringValueMethod · 0.95
getFieldNameMethod · 0.65
toStringMethod · 0.65
oneValueMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected