use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies in project kie-wb-common by kiegroup.
the class DependencyLoader method returnDefault.
private void returnDefault() {
final EnhancedDependencies enhancedDependencies = new EnhancedDependencies();
for (final Dependency dependency : updateQueue) {
enhancedDependencies.add(new NormalEnhancedDependency(dependency, new HashSet<>()));
}
updateQueue.clear();
manager.onEnhancedDependenciesUpdated(enhancedDependencies);
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies in project kie-wb-common by kiegroup.
the class DependencyLoaderLoadFailureTest method testFailureOnLoad.
@Test
public void testFailureOnLoad() throws Exception {
dependencyLoader.addToQueue(makeDependency("org.junit", "junit", "1.0"));
dependencyLoader.load();
failLoad();
final EnhancedDependencies enhancedDependencies = getUpdatedEnhancedDependencies();
verify(view).showBusyIndicator("Loading");
verify(view).hideBusyIndicator();
assertEquals(1, enhancedDependencies.size());
assertNotNull(enhancedDependencies.get(new GAV("org.junit", "junit", "1.0")));
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies in project kie-wb-common by kiegroup.
the class DependencyLoaderTest method testLoadEmptyQueue.
@Test
public void testLoadEmptyQueue() throws Exception {
dependencyLoader.load();
final EnhancedDependencies enhancedDependencies = getUpdatedEnhancedDependencies();
assertTrue(enhancedDependencies.isEmpty());
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManager_onEchancedDependenciesLoadedTest method testShowEmpty.
@Test
public void testShowEmpty() throws Exception {
originalSetOfDependencies.clear();
enhancedDependenciesManager.onEnhancedDependenciesUpdated(new EnhancedDependencies());
assertNotNull(shownDependencies);
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies in project kie-wb-common by kiegroup.
the class DependencyLoaderTest method testAdd.
@Test
public void testAdd() throws Exception {
final EnhancedDependencies enhancedDependencies = new EnhancedDependencies();
when(dependencyService.loadEnhancedDependencies(anyCollection())).thenReturn(enhancedDependencies);
dependencyLoader.addToQueue(makeDependency("artifactId", "groupId", "1.0"));
dependencyLoader.load();
verify(view).showBusyIndicator("Loading");
verify(view).hideBusyIndicator();
final EnhancedDependencies updatedEnhancedDependencies = getUpdatedEnhancedDependencies();
assertEquals(enhancedDependencies, updatedEnhancedDependencies);
}
Aggregations