We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f32524 commit babf75eCopy full SHA for babf75e
1 file changed
src/test/java/com/dampcake/bencode/BencodeOutputStreamTest.java
@@ -92,11 +92,17 @@ public void testWriteStringEmptyByteArray() throws Exception {
92
}
93
94
@Test
95
- public void testWriteStringNullByteArray() throws Exception {
+ public void testWriteStringNullByteBuffer() throws Exception {
96
assertThrows(NullPointerException.class, () -> instance.writeString((ByteBuffer) null));
97
assertEquals(0, out.toByteArray().length);
98
99
100
+ @Test
101
+ public void testWriteStringNullByteArray() throws Exception {
102
+ assertThrows(NullPointerException.class, () -> instance.writeString((byte[]) null));
103
+ assertEquals(0, out.toByteArray().length);
104
+ }
105
+
106
107
public void testWriteNumber() throws Exception {
108
instance.writeNumber(123456);
0 commit comments