@Test public void propertyNotPresentWarnTest() throws IOException, SAXException, ParserConfigurationException { PomRemoveProperty pomRemoveProperty = new PomRemoveProperty("zoo").relative("pom.xml").warnIfNotPresent(); TOExecutionResult executionResult = pomRemoveProperty.execution(transformedAppFolder, transformationContext); assertEqualsXml("pom.xml"); assertEquals(executionResult.getType(), TOExecutionResult.Type.WARNING); assertNull(executionResult.getException()); assertNotNull(executionResult.getWarnings()); assertEquals(executionResult.getWarnings().size(), 1); assertEquals(executionResult.getWarnings().get(0).getClass(), TransformationOperationException.class); assertEquals(executionResult.getWarnings().get(0).getMessage(), "Property zoo has not been removed from POM file /pom.xml because it is not present"); }
@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();  }