pull/9965/head
Andy Wilkinson 7 years ago
parent 6090fd3eb0
commit e9aeb9ad63

@ -103,15 +103,13 @@ public class RequestMappingEndpointTests {
assertThat(result).hasSize(2);
assertThat(result.keySet())
.filteredOn((key) -> key.contains("/dump || /dump.json"))
.hasOnlyOneElementSatisfying((key) -> {
assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method");
});
.hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method"));
assertThat(result.keySet()).filteredOn((key) -> key.contains(" || /.json"))
.hasOnlyOneElementSatisfying((key) -> {
assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method");
});
.hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method"));
}
@SuppressWarnings("unchecked")
@ -127,15 +125,13 @@ public class RequestMappingEndpointTests {
assertThat(result).hasSize(2);
assertThat(result.keySet())
.filteredOn((key) -> key.contains("/dump || /dump.json"))
.hasOnlyOneElementSatisfying((key) -> {
assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method");
});
.hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method"));
assertThat(result.keySet()).filteredOn((key) -> key.contains(" || /.json"))
.hasOnlyOneElementSatisfying((key) -> {
assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method");
});
.hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method"));
}
@Configuration

@ -52,10 +52,9 @@ public class TomcatEmbeddedWebappClassLoaderTests {
@Test
public void getResourceFindsResourceFromParentClassLoader() throws Exception {
File war = createWar();
withWebappClassLoader(war, (classLoader) -> {
assertThat(classLoader.getResource("test.txt"))
.isEqualTo(new URL(webInfClassesUrlString(war) + "test.txt"));
});
withWebappClassLoader(war,
(classLoader) -> assertThat(classLoader.getResource("test.txt"))
.isEqualTo(new URL(webInfClassesUrlString(war) + "test.txt")));
}
@Test

Loading…
Cancel
Save