@Test public void fileDoesNotExistTest() { PomRemoveProperty pomRemoveProperty = new PomRemoveProperty("zoo").relative("non_existent_file.xml").warnIfNotPresent(); TOExecutionResult executionResult = pomRemoveProperty.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.ERROR); assertEquals(executionResult.getException().getClass(), TransformationOperationException.class); assertEquals(executionResult.getException().getMessage(), "POM file could not be modified"); assertEquals(executionResult.getException().getCause().getClass(), FileNotFoundException.class); assertEquals(executionResult.getException().getCause().getMessage(), new File(transformedAppFolder, "non_existent_file.xml").getAbsolutePath() + " (No such file or directory)"); }
@Override public PomRemoveProperty warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; }
PomRemoveProperty extends AbstractPomOperation<PomRemoveProperty> implements ChangeOrRemoveElement<PomRemoveProperty> { @Override public PomRemoveProperty warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } }
PomRemoveProperty extends AbstractPomOperation<PomRemoveProperty> implements ChangeOrRemoveElement<PomRemoveProperty> { @Override public PomRemoveProperty warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveProperty();  PomRemoveProperty(String propertyName); }
PomRemoveProperty extends AbstractPomOperation<PomRemoveProperty> implements ChangeOrRemoveElement<PomRemoveProperty> { @Override public PomRemoveProperty warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveProperty();  PomRemoveProperty(String propertyName); PomRemoveProperty setPropertyName(String propertyName); @Override PomRemoveProperty failIfNotPresent(); @Override PomRemoveProperty warnIfNotPresent(); @Override PomRemoveProperty noOpIfNotPresent(); String getPropertyName(); @Override String getDescription(); }
PomRemoveProperty extends AbstractPomOperation<PomRemoveProperty> implements ChangeOrRemoveElement<PomRemoveProperty> { @Override public PomRemoveProperty warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveProperty();  PomRemoveProperty(String propertyName); PomRemoveProperty setPropertyName(String propertyName); @Override PomRemoveProperty failIfNotPresent(); @Override PomRemoveProperty warnIfNotPresent(); @Override PomRemoveProperty noOpIfNotPresent(); String getPropertyName(); @Override String getDescription();  }