use of org.wso2.ballerinalang.compiler.packaging.converters.URIConverter in project ballerina by ballerina-lang.
the class URIConverterTest method testURIConverter.
@Test
public void testURIConverter() {
URI baseURI = URI.create("http://staging.central.ballerina.io:9090/");
Patten patten = new Patten(path("natasha", "foo.bar", "1.0.5"));
URIConverter subject = new URIConverter(baseURI);
List<URI> urls = patten.convert(subject).collect(Collectors.toList());
URI expected = URI.create("http://staging.central.ballerina.io:9090/natasha/foo.bar/1.0.5/");
Assert.assertEquals(urls, Collections.singletonList(expected));
}
Aggregations