We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a5482e commit 21d66c8Copy full SHA for 21d66c8
src/test/java/com/dampcake/bencode/BencodeTest.java
@@ -107,6 +107,14 @@ public void testDecodeNullType() {
107
instance.decode("12:Hello World!".getBytes(), null);
108
}
109
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
118
@Test
119
public void testDecodeString() {
120
String decoded = instance.decode("12:Hello World!".getBytes(), Type.STRING);
0 commit comments