@Test public void compareXMLInexistentFilesTest() { CompareXMLFiles compareXML; TUExecutionResult executionResult; Mockito.when(transformationContext.get("ATR")).thenReturn(new File(transformedAppFolder, "/src/main/resources/inexistent_file.xml")); compareXML = new CompareXMLFiles().setAttribute("ATR").relative("pom.xml"); executionResult = compareXML.execution(transformedAppFolder, transformationContext); Assert.assertEquals(executionResult.getType(), TUExecutionResult.Type.VALUE); Assert.assertFalse((Boolean) executionResult.getValue()); Mockito.when(transformationContext.get("ATR")).thenReturn(new File(transformedAppFolder, "/src/main/resources/inexistent_file.xml")); compareXML = new CompareXMLFiles().setAttribute("ATR").relative("/src/main/resources/another_inexistent_file.yaml"); executionResult = compareXML.execution(transformedAppFolder, transformationContext); Assert.assertEquals(executionResult.getType(), TUExecutionResult.Type.VALUE); Assert.assertTrue((Boolean) executionResult.getValue()); Mockito.when(transformationContext.get("ATR")).thenReturn(new File(transformedAppFolder, "pom.xml")); compareXML = new CompareXMLFiles().setAttribute("ATR").relative("/src/main/resources/another_inexistent_file.xml"); executionResult = compareXML.execution(transformedAppFolder, transformationContext); Assert.assertEquals(executionResult.getType(), TUExecutionResult.Type.VALUE); Assert.assertFalse((Boolean) executionResult.getValue()); }
@Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); }
CompareXMLFiles extends DoubleCondition<CompareXMLFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } }
CompareXMLFiles extends DoubleCondition<CompareXMLFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareXMLFiles();  CompareXMLFiles(String attribute); }
CompareXMLFiles extends DoubleCondition<CompareXMLFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareXMLFiles();  CompareXMLFiles(String attribute); @Override String getDescription(); }
CompareXMLFiles extends DoubleCondition<CompareXMLFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareXMLFiles();  CompareXMLFiles(String attribute); @Override String getDescription();  }