You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if @TestHTTPResource (as String) supports path params, as RESTassured already supports it.
Currently, the following test throws an exception:
@QuarkusTest
public class UserTests {
@TestHTTPEndpoint(UserResource.class)
@TestHTTPResource("{userId}/order/{orderId}")
String getUserOrderUrl;
@Test
void testGettingUserOrder() {
int userId = 123;
int orderId = 456;
given().when().get(getUserOrderUrl, userId, orderId)
.then().statusCode(200);
}
}
Caused by:
java.net.URISyntaxException: Illegal character in path at index 30: http://localhost:8081/user/v1/{userId}/order/{orderId}
at java.base/java.net.URI$Parser.fail(URI.java:2963)
at java.base/java.net.URI$Parser.checkChars(URI.java:3134)
at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3216)
at java.base/java.net.URI$Parser.parse(URI.java:3164)
at java.base/java.net.URI.<init>(URI.java:628)
at io.quarkus.test.common.http.TestHTTPResourceManager.inject(TestHTTPResourceManager.java:105)
... 83 more
Implementation ideas
No response
The text was updated successfully, but these errors were encountered:
Description
It would be nice if
@TestHTTPResource
(asString
) supports path params, as RESTassured already supports it.Currently, the following test throws an exception:
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: