@Test public void failNotPresentTest() throws IOException, XmlPullParserException { PomRemoveDependency uut = new PomRemoveDependency("com.test", "not-present").relative("pom.xml").failIfNotPresent(); assertNull(getDependencyBeforeChange(uut)); TOExecutionResult executionResult = uut.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.ERROR); assertExceptionOccurred(executionResult); assertNotChangedFile("pom.xml"); }
@Override public PomRemoveDependency failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; }
PomRemoveDependency extends AbstractArtifactPomOperation<PomRemoveDependency> implements ChangeOrRemoveElement<PomRemoveDependency> { @Override public PomRemoveDependency failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } }
PomRemoveDependency extends AbstractArtifactPomOperation<PomRemoveDependency> implements ChangeOrRemoveElement<PomRemoveDependency> { @Override public PomRemoveDependency failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveDependency();  PomRemoveDependency(String groupId, String artifactId); }
PomRemoveDependency extends AbstractArtifactPomOperation<PomRemoveDependency> implements ChangeOrRemoveElement<PomRemoveDependency> { @Override public PomRemoveDependency failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveDependency();  PomRemoveDependency(String groupId, String artifactId); @Override PomRemoveDependency failIfNotPresent(); @Override PomRemoveDependency warnIfNotPresent(); @Override PomRemoveDependency noOpIfNotPresent(); @Override String getDescription(); @Override boolean equals(Object obj); @Override int hashCode(); }
PomRemoveDependency extends AbstractArtifactPomOperation<PomRemoveDependency> implements ChangeOrRemoveElement<PomRemoveDependency> { @Override public PomRemoveDependency failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveDependency();  PomRemoveDependency(String groupId, String artifactId); @Override PomRemoveDependency failIfNotPresent(); @Override PomRemoveDependency warnIfNotPresent(); @Override PomRemoveDependency noOpIfNotPresent(); @Override String getDescription(); @Override boolean equals(Object obj); @Override int hashCode();  }