use of com.tvd12.ezyfox.function.EzySupplier in project ezyhttp by youngmonkeys.
the class ResourceLoaderTest method addURLsToSetTest.
@Test
public void addURLsToSetTest() {
// given
ResourceLoader sut = new ResourceLoader();
Set<URL> answer = new HashSet<>();
Exception exception = new Exception("just test");
EzySupplier<Enumeration<URL>> supplier = () -> {
throw exception;
};
// when
MethodInvoker.create().object(sut).method("addURLsToSet").param(Set.class, answer).param(EzySupplier.class, supplier).invoke();
// then
Asserts.assertTrue(answer.isEmpty());
}
Aggregations