I'm using @Nested for some of my test classes, but the this lib does not seems to handle it very well:
@EnableWireMock({
@ConfigureWireMock(name = "external-api", property = "application.external-api.base-url")
})
public class ExternalServiceTest extends IntegrationTest {
@InjectWireMock("external-api")
WireMockServer externalApiMock;
@Nested
@DisplayName("Test Something")
public class TestSomething {
@Test
public void test1() {
externalApiMock.stubFor(post(urlPathEqualTo("/test")).willReturn(ok())); // Throws a NullPointerException
}
}
}
However moving the annotation to the nested class works fine. So, not a blocker. However, it would be nice if this worked with nested classes in the example above.
First off, great lib! Thanks!
I'm using
@Nested
for some of my test classes, but the this lib does not seems to handle it very well:However moving the annotation to the nested class works fine. So, not a blocker. However, it would be nice if this worked with nested classes in the example above.