Search in sources :

Example 11 with EnhancedDependencies

use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies 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

EnhancedDependencies (org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies)11 Test (org.junit.Test)8 HashSet (java.util.HashSet)5 NormalEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency)5 Dependency (org.guvnor.common.services.project.model.Dependency)3 EnhancedDependency (org.kie.workbench.common.services.shared.dependencies.EnhancedDependency)2 Callback (org.uberfire.client.callbacks.Callback)2 Dependencies (org.guvnor.common.services.project.model.Dependencies)1 GAV (org.guvnor.common.services.project.model.GAV)1 POM (org.guvnor.common.services.project.model.POM)1 Before (org.junit.Before)1 Util.makeDependency (org.kie.workbench.common.screens.projecteditor.client.forms.dependencies.Util.makeDependency)1