use of org.wso2.ballerinalang.compiler.packaging.converters.Converter in project ballerina by ballerina-lang.
the class PattenTest method testLazy.
/**
* Disabled because it fails in JVM 8
* See: https://bugs.openjdk.java.net/browse/JDK-8075939
*/
@Test(enabled = false)
public void testLazy() {
Converter<String> mock = mockResolver("root-dir", null, s -> Stream.concat(Stream.of("", ""), Stream.generate(() -> {
Assert.fail("method called. Hence not lazy.");
return "";
})), null);
Patten subject = new Patten(Patten.WILDCARD_DIR);
List<String> strings = subject.convert(mock).limit(1).collect(Collectors.toList());
Assert.assertTrue(strings.isEmpty());
}
Aggregations