@Test public void defaultIfPresentTest() throws IOException, XmlPullParserException { PomAddManagedDependency uut = new PomAddManagedDependency("junit", "junit", "4.12").relative("pom.xml"); TOExecutionResult executionResult = uut.execution(transformedAppFolder, transformationContext); Assert.assertEquals(executionResult.getType(), TOExecutionResult.Type.ERROR); Assert.assertNotNull(executionResult.getException()); Assert.assertEquals(executionResult.getException().getClass(), TransformationOperationException.class); Dependency dependencyAfterChange = getManagedDependencyInList(getTransformedPomModel("pom.xml"), "xmlunit", "xmlunit", "1.7"); Assert.assertNull(dependencyAfterChange); assertNotChangedFile("pom.xml"); }
public String getType() { return type; }
PomAddManagedDependency extends AbstractArtifactPomOperation<PomAddManagedDependency> implements AddElement<PomAddManagedDependency> { public String getType() { return type; } }
PomAddManagedDependency extends AbstractArtifactPomOperation<PomAddManagedDependency> implements AddElement<PomAddManagedDependency> { public String getType() { return type; } PomAddManagedDependency();  PomAddManagedDependency(String groupId, String artifactId, String version);  PomAddManagedDependency(String groupId, String artifactId, String version, String scope); }
PomAddManagedDependency extends AbstractArtifactPomOperation<PomAddManagedDependency> implements AddElement<PomAddManagedDependency> { public String getType() { return type; } PomAddManagedDependency();  PomAddManagedDependency(String groupId, String artifactId, String version);  PomAddManagedDependency(String groupId, String artifactId, String version, String scope); PomAddManagedDependency setVersion(String version); PomAddManagedDependency setScope(String scope); PomAddManagedDependency setType(String type); @Override PomAddManagedDependency failIfPresent(); @Override PomAddManagedDependency warnNotAddIfPresent(); @Override PomAddManagedDependency warnButAddIfPresent(); @Override PomAddManagedDependency noOpIfPresent(); @Override PomAddManagedDependency overwriteIfPresent(); String getVersion(); String getScope(); String getType(); @Override String getDescription(); }
PomAddManagedDependency extends AbstractArtifactPomOperation<PomAddManagedDependency> implements AddElement<PomAddManagedDependency> { public String getType() { return type; } PomAddManagedDependency();  PomAddManagedDependency(String groupId, String artifactId, String version);  PomAddManagedDependency(String groupId, String artifactId, String version, String scope); PomAddManagedDependency setVersion(String version); PomAddManagedDependency setScope(String scope); PomAddManagedDependency setType(String type); @Override PomAddManagedDependency failIfPresent(); @Override PomAddManagedDependency warnNotAddIfPresent(); @Override PomAddManagedDependency warnButAddIfPresent(); @Override PomAddManagedDependency noOpIfPresent(); @Override PomAddManagedDependency overwriteIfPresent(); String getVersion(); String getScope(); String getType(); @Override String getDescription();  }