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

Method checkNullBlob

src/test/java/com/amazon/ion/BlobTest.java:29–54  ·  view source on GitHub ↗
(IonBlob value)

Source from the content-addressed store, hash-verified

27 extends IonTestCase
28{
29 public void checkNullBlob(IonBlob value)
30 throws IOException
31 {
32 assertSame(IonType.BLOB, value.getType());
33 assertTrue(value.isNullValue());
34 assertNull(value.newInputStream());
35 assertNull(value.getBytes());
36
37 try
38 {
39 value.byteSize();
40 fail("expected NullValueException");
41 }
42 catch (NullValueException e)
43 {
44 }
45
46 StringBuilder buf = new StringBuilder();
47 try
48 {
49 value.printBase64(buf);
50 fail("expected NullValueException");
51 }
52 catch (NullValueException e) { /* ok */ }
53 assertEquals(0, buf.length());
54 }
55
56
57

Callers 3

modifyBlobMethod · 0.95
testFactoryBlobMethod · 0.95
testTextNullBlobMethod · 0.95

Calls 9

failMethod · 0.80
lengthMethod · 0.80
getTypeMethod · 0.65
isNullValueMethod · 0.65
newInputStreamMethod · 0.65
getBytesMethod · 0.65
byteSizeMethod · 0.65
printBase64Method · 0.65
assertEqualsMethod · 0.45

Tested by

no test coverage detected