Skip to content

Commit 980872a

Browse files
committed
Update tests.
1 parent 0eac803 commit 980872a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

kilo-test/src/test/java/org/httprpc/kilo/test/WebServiceProxyTest.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,4 +794,26 @@ public void testDefaultProxyMethod() throws IOException {
794794

795795
assertEquals(33, result);
796796
}
797+
798+
@Test
799+
public void testQueryDefined() {
800+
var webServiceProxy = new WebServiceProxy("GET", baseURI.resolve("test?foo=bar"));
801+
802+
webServiceProxy.setArguments(mapOf(
803+
entry("foo", "bar")
804+
));
805+
806+
assertThrows(IllegalStateException.class, webServiceProxy::invoke);
807+
}
808+
809+
@Test
810+
public void testFragmentDefined() {
811+
var webServiceProxy = new WebServiceProxy("GET", baseURI.resolve("test#foo"));
812+
813+
webServiceProxy.setArguments(mapOf(
814+
entry("foo", "bar")
815+
));
816+
817+
assertThrows(IllegalStateException.class, webServiceProxy::invoke);
818+
}
797819
}

0 commit comments

Comments
 (0)