@Test public void moduleNotPresentWarnTest() throws IOException, SAXException, ParserConfigurationException { PomRemoveModule pomRemoveModule = new PomRemoveModule("zoo").relative("pom.xml").warnIfNotPresent(); TOExecutionResult executionResult = pomRemoveModule.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(), "Module zoo has not been removed from POM file /pom.xml because it is not present"); }
@Override public PomRemoveModule warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveModule();  PomRemoveModule(String moduleName); }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveModule();  PomRemoveModule(String moduleName); PomRemoveModule setModuleName(String moduleName); @Override PomRemoveModule failIfNotPresent(); @Override PomRemoveModule warnIfNotPresent(); @Override PomRemoveModule noOpIfNotPresent(); String getModuleName(); @Override String getDescription(); }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveModule();  PomRemoveModule(String moduleName); PomRemoveModule setModuleName(String moduleName); @Override PomRemoveModule failIfNotPresent(); @Override PomRemoveModule warnIfNotPresent(); @Override PomRemoveModule noOpIfNotPresent(); String getModuleName(); @Override String getDescription();  }