use of org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency in project kie-wb-common by kiegroup.
the class DependenciesItemPresenterTest method testSetupNormal.
@Test
public void testSetupNormal() {
dependenciesItemPresenter.setup(new NormalEnhancedDependency(mock(Dependency.class), emptySet()), new WhiteList(), mock(DependenciesPresenter.class));
verify(view).init(any());
verify(view).setGroupId(any());
verify(view).setArtifactId(any());
verify(view).setVersion(any());
verify(view).setPackagesWhiteListedState(any());
verify(view).setTransitiveDependency(eq(false));
}
use of org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency in project kie-wb-common by kiegroup.
the class DependenciesItemPresenterTest method testRemove.
@Test
public void testRemove() {
final DependenciesPresenter parentPresenter = mock(DependenciesPresenter.class);
final EnhancedDependency enhancedDependency = new NormalEnhancedDependency(mock(Dependency.class), emptySet());
dependenciesItemPresenter.parentPresenter = parentPresenter;
dependenciesItemPresenter.enhancedDependency = enhancedDependency;
dependenciesItemPresenter.remove();
verify(parentPresenter).remove(eq(enhancedDependency));
}
use of org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency in project kie-wb-common by kiegroup.
the class DependenciesItemPresenterTest method testRemoveAllPackagesToWhiteList.
@Test
public void testRemoveAllPackagesToWhiteList() {
final DependenciesPresenter parentPresenter = mock(DependenciesPresenter.class);
final Set<String> packages = new HashSet<>(Arrays.asList("foo", "bar"));
final EnhancedDependency enhancedDependency = new NormalEnhancedDependency(mock(Dependency.class), packages);
dependenciesItemPresenter.parentPresenter = parentPresenter;
dependenciesItemPresenter.enhancedDependency = enhancedDependency;
dependenciesItemPresenter.removeAllPackagesFromWhiteList();
verify(parentPresenter).removeAllFromWhiteList(eq(packages));
}
use of org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency 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.NormalEnhancedDependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManagerTest method testDelete.
@Test
public void testDelete() throws Exception {
enhancedDependenciesManager.addNew(makeDependency("artifactId", "groupId", "1.0"));
enhancedDependenciesManager.delete(new NormalEnhancedDependency(makeDependency("artifactId", "groupId", "1.0"), new HashSet<String>()));
assertTrue(originalSetOfDependencies.isEmpty());
}
Aggregations