|
|
|
|
@ -87,13 +87,11 @@ class WebTestClientAutoConfigurationTests {
@@ -87,13 +87,11 @@ class WebTestClientAutoConfigurationTests {
|
|
|
|
|
void shouldFailWithNeitherDefaultWebHandlerNorWebApplicationContext() { |
|
|
|
|
ClassLoader parentClassLoader = Thread.currentThread().getContextClassLoader(); |
|
|
|
|
this.contextRunner.withClassLoader(new FilteredClassLoader(parentClassLoader, WebApplicationContext.class)) |
|
|
|
|
.run((context) -> { |
|
|
|
|
assertThat(context).getFailure() |
|
|
|
|
.run((context) -> assertThat(context).getFailure() |
|
|
|
|
.rootCause() |
|
|
|
|
.isInstanceOf(RuntimeException.class) |
|
|
|
|
.hasMessageStartingWith("Mock WebTestClient support requires") |
|
|
|
|
.hasMessageContaining("WebApplicationContext"); |
|
|
|
|
}); |
|
|
|
|
.hasMessageContaining("WebApplicationContext")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|