@Test public void moduleNotPresentErrorTest() throws IOException { PomRemoveModule pomRemoveModule = new PomRemoveModule("zoo").relative("pom.xml").failIfNotPresent(); TOExecutionResult executionResult = pomRemoveModule.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.ERROR); assertEquals(executionResult.getException().getClass(), TransformationOperationException.class); assertEquals(executionResult.getException().getMessage(), "Module zoo has not been removed from POM file /pom.xml because it is not present"); assertNull(executionResult.getException().getCause()); assertNull(executionResult.getDetails()); assertNotChangedFile("pom.xml"); assertEquals(new PomRemoveModule("zoo").relative("pom.xml").execution(transformedAppFolder, transformationContext).getType(), TOExecutionResult.Type.ERROR); }
@Override public PomRemoveModule failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveModule();  PomRemoveModule(String moduleName); }
PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { @Override public PomRemoveModule failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; 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 failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveModule();  PomRemoveModule(String moduleName); PomRemoveModule setModuleName(String moduleName); @Override PomRemoveModule failIfNotPresent(); @Override PomRemoveModule warnIfNotPresent(); @Override PomRemoveModule noOpIfNotPresent(); String getModuleName(); @Override String getDescription();  }