-
Notifications
You must be signed in to change notification settings - Fork 7
/
App18Test.java
23 lines (18 loc) · 923 Bytes
/
App18Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package de.qaware.openapigeneratorforspring.test.app18;
import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxBaseIntTest;
import org.junit.jupiter.api.Test;
import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.findResourceFilenameFromTestClass;
class App18Test extends AbstractOpenApiGeneratorWebFluxBaseIntTest {
@Test
void testWithQueryParam() throws Exception {
assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_admin.json"),
performApiDocsRequest(x -> x.queryParam("pathPrefix", "/admin"), x -> x)
);
}
@Test
void testWithHeaderParam() throws Exception {
assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_user.json"),
performApiDocsRequest(x -> x, x -> x.header("X-Path-Prefix", "/user"))
);
}
}