use of org.guvnor.common.services.project.model.Dependencies 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.Dependencies in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManagerTest method setUp.
@Before
public void setUp() throws Exception {
originalSetOfDependencies = new Dependencies();
pom = new POM();
pom.setDependencies(originalSetOfDependencies);
enhancedDependenciesManager.init(pom, callback);
}
use of org.guvnor.common.services.project.model.Dependencies in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManager_onEchancedDependenciesLoadedTest method setUp.
@Before
public void setUp() throws Exception {
shownDependencies = null;
originalSetOfDependencies = new Dependencies();
junit = makeDependency("org.junit", "junit", "1.0");
originalSetOfDependencies.add(junit);
originalSetOfDependencies.add(makeDependency("org.drools", "drools-core", "4.0"));
final POM pom = new POM();
pom.setDependencies(originalSetOfDependencies);
enhancedDependenciesManager.init(pom, new Callback<EnhancedDependencies>() {
@Override
public void callback(final EnhancedDependencies result) {
shownDependencies = result;
}
});
}
Aggregations