Search in sources :

Example 11 with NormalEnhancedDependency

use of org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency in project kie-wb-common by kiegroup.

the class EnhancedDependenciesManager_onEchancedDependenciesLoadedTest method testEditingEnhancedUpdatesOriginal.

@Test
public void testEditingEnhancedUpdatesOriginal() throws Exception {
    final EnhancedDependencies loadedEnhancedDependencies = new EnhancedDependencies();
    loadedEnhancedDependencies.add(new NormalEnhancedDependency(makeDependency("org.junit", "junit", "1.0"), new HashSet<String>()));
    enhancedDependenciesManager.onEnhancedDependenciesUpdated(loadedEnhancedDependencies);
    final EnhancedDependency enhancedDependency = shownDependencies.asList().get(0);
    enhancedDependency.getDependency().setArtifactId("newId");
    assertEquals("newId", junit.getArtifactId());
}
Also used : EnhancedDependencies(org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies) NormalEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency) EnhancedDependency(org.kie.workbench.common.services.shared.dependencies.EnhancedDependency) NormalEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

NormalEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency)11 HashSet (java.util.HashSet)8 Test (org.junit.Test)8 Dependency (org.guvnor.common.services.project.model.Dependency)7 EnhancedDependency (org.kie.workbench.common.services.shared.dependencies.EnhancedDependency)6 EnhancedDependencies (org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies)5 TransitiveEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency)3 Util.makeDependency (org.kie.workbench.common.screens.projecteditor.client.forms.dependencies.Util.makeDependency)1 WhiteList (org.kie.workbench.common.services.shared.whitelist.WhiteList)1 Callback (org.uberfire.client.callbacks.Callback)1