This commit is contained in:
Andy Wilkinson
2019-02-20 20:06:31 +00:00
parent f8e5b9ba47
commit 53326695ea
10 changed files with 24 additions and 26 deletions

View File

@@ -152,13 +152,9 @@ public abstract class AbstractApplicationContextRunnerTests<T extends AbstractAp
@Test
public void runWithClassLoaderShouldSetClassLoaderOnContext() {
get().withClassLoader(new FilteredClassLoader(Gson.class.getPackage().getName()))
.run((context) -> {
assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> {
ClassUtils.forName(Gson.class.getName(),
context.getClassLoader());
});
});
.run((context) -> assertThatExceptionOfType(ClassNotFoundException.class)
.isThrownBy(() -> ClassUtils.forName(Gson.class.getName(),
context.getClassLoader())));
}
@Test