Skip to content

Commit babf75e

Browse files
authored
Add missing test case from coverage report (#23)
1 parent 3f32524 commit babf75e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/java/com/dampcake/bencode/BencodeOutputStreamTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,17 @@ public void testWriteStringEmptyByteArray() throws Exception {
9292
}
9393

9494
@Test
95-
public void testWriteStringNullByteArray() throws Exception {
95+
public void testWriteStringNullByteBuffer() throws Exception {
9696
assertThrows(NullPointerException.class, () -> instance.writeString((ByteBuffer) null));
9797
assertEquals(0, out.toByteArray().length);
9898
}
9999

100+
@Test
101+
public void testWriteStringNullByteArray() throws Exception {
102+
assertThrows(NullPointerException.class, () -> instance.writeString((byte[]) null));
103+
assertEquals(0, out.toByteArray().length);
104+
}
105+
100106
@Test
101107
public void testWriteNumber() throws Exception {
102108
instance.writeNumber(123456);

0 commit comments

Comments
 (0)