use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class DependencyValidatorTest method testGroupId.
@Test
public void testGroupId() throws Exception {
DependencyValidator dependencyValidator = new DependencyValidator(new Dependency(new GAV(null, "artifactId", "1.0")));
assertFalse(dependencyValidator.validate());
assertEquals("DependencyIsMissingAGroupId", dependencyValidator.getMessage());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesAsListTest method addDroolsCompiler.
public void addDroolsCompiler() {
droolsCompilerNormalDependency = new NormalEnhancedDependency(new Dependency(new GAV("org.drools:drools-compiler:1.3")), new HashSet<>());
droolsApiTransitiveDependency2 = new TransitiveEnhancedDependency(new Dependency(new GAV("org.drools:drools-api:1.0")), new HashSet<>());
droolsCompilerNormalDependency.addTransitiveDependency(droolsApiTransitiveDependency2);
enhancedDependencies.add(droolsCompilerNormalDependency);
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesAsListTest method addXStream.
private void addXStream() {
xstreamNormalDependency = new NormalEnhancedDependency(new Dependency(new GAV("org.xstream:xstream:1.0")), new HashSet<>());
enhancedDependencies.add(xstreamNormalDependency);
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesTest method testUpdate.
@Test
public void testUpdate() throws Exception {
enhancedDependencies.update(new NormalEnhancedDependency(new Dependency(new GAV("org.hamcrest", "hamcrest-core", "1.3")), new HashSet<String>()));
NormalEnhancedDependency enhancedDependency = (NormalEnhancedDependency) enhancedDependencies.get(new GAV("org.hamcrest", "hamcrest-core", "1.3"));
assertTrue(enhancedDependency.getTransitiveDependencies().isEmpty());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesTest method testRemoveRemovesByDependencyGAV.
@Test
public void testRemoveRemovesByDependencyGAV() throws Exception {
assertTrue(enhancedDependencies.remove(new NormalEnhancedDependency(new Dependency(new GAV("org.hamcrest", "hamcrest-core", "1.3")), new HashSet<String>())));
assertTrue(enhancedDependencies.isEmpty());
}
Aggregations