use of com.vaadin.flow.shared.ui.Dependency.Type in project flow by vaadin.
the class DependencyListTest method testAddingDuplicateDependencies.
private void testAddingDuplicateDependencies(LoadMode first, LoadMode second, LoadMode expected) {
String url = "foo/bar.js";
Type type = Type.JAVASCRIPT;
// need to clear so that there is no leftovers
deps = new DependencyList();
deps.add(new Dependency(type, url, first));
deps.add(new Dependency(type, url, second));
Collection<Dependency> pendingSendToClient = deps.getPendingSendToClient();
assertEquals("Expected to have only one dependency", 1, pendingSendToClient.size());
assertEquals("Wrong load mode resolved", pendingSendToClient.iterator().next().getLoadMode(), expected);
}
Aggregations