use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManagerTest method testAddByPOM.
@Test
public void testAddByPOM() throws Exception {
final Dependency defaultDependency = makeDependency("artifactId", "groupId", "1.0");
final Dependency compileDependency = makeDependency("artifactId", "groupId", "2.0", "compile");
final Dependency testDependency = makeDependency("artifactId", "groupId", "3.0", "test");
final Dependencies dependencies = new Dependencies(Arrays.asList(defaultDependency, compileDependency, testDependency));
final ArgumentCaptor<Dependency> argumentCaptor = ArgumentCaptor.forClass(Dependency.class);
pom.setDependencies(dependencies);
enhancedDependenciesManager.init(pom, callback);
verify(dependencyLoader, times(2)).addToQueue(argumentCaptor.capture());
assertEquals(Arrays.asList(defaultDependency, compileDependency), argumentCaptor.getAllValues());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManagerTest method testAdd.
@Test
public void testAdd() throws Exception {
final Dependency dependency = makeDependency("artifactId", "groupId", "1.0");
enhancedDependenciesManager.addNew(dependency);
verify(dependencyLoader).load();
assertEquals(1, originalSetOfDependencies.size());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManagerTest method makeDependency.
private Dependency makeDependency(final String artifactId, final String groupId, final String version) {
final Dependency dependency = new Dependency();
dependency.setArtifactId(artifactId);
dependency.setGroupId(groupId);
dependency.setVersion(version);
return dependency;
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class NewDependencyPopupValidationTest method testFillValidDependency.
@Test
public void testFillValidDependency() throws Exception {
fillInValidGAV();
final Dependency dependency = userClicksOk();
assertEquals("groupID", dependency.getGroupId());
assertEquals("myArtifactID", dependency.getArtifactId());
assertEquals("1.0", dependency.getVersion());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class Util method makeDependency.
public static Dependency makeDependency(final String artifactId, final String groupId, final String version) {
final Dependency dependency = new Dependency();
dependency.setArtifactId(artifactId);
dependency.setGroupId(groupId);
dependency.setVersion(version);
return dependency;
}
Aggregations