Skip to content

Commit 21d66c8

Browse files
committed
Add missing test.
1 parent 0a5482e commit 21d66c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ public void testDecodeNullType() {
107107
instance.decode("12:Hello World!".getBytes(), null);
108108
}
109109

110+
@Test
111+
public void testDecodeUnknownType() {
112+
exception.expect(IllegalArgumentException.class);
113+
exception.expectMessage("type cannot be UNKNOWN");
114+
115+
instance.decode("12:Hello World!".getBytes(), Type.UNKNOWN);
116+
}
117+
110118
@Test
111119
public void testDecodeString() {
112120
String decoded = instance.decode("12:Hello World!".getBytes(), Type.STRING);

0 commit comments

Comments
 (0)