File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/test/java/com/dampcake/bencode Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,17 @@ public void testWriteStringEmptyByteArray() throws Exception {
92
92
}
93
93
94
94
@ Test
95
- public void testWriteStringNullByteArray () throws Exception {
95
+ public void testWriteStringNullByteBuffer () throws Exception {
96
96
assertThrows (NullPointerException .class , () -> instance .writeString ((ByteBuffer ) null ));
97
97
assertEquals (0 , out .toByteArray ().length );
98
98
}
99
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
+
100
106
@ Test
101
107
public void testWriteNumber () throws Exception {
102
108
instance .writeNumber (123456 );
You can’t perform that action at this time.
0 commit comments