@Test public void compareFilesInexistentFilesTest() { CompareFiles compareFiles; TUExecutionResult executionResult; Mockito.when(transformationContext.get("ATR")).thenReturn(new File(transformedAppFolder, "/src/main/resources/inexistent_file")); compareFiles = new CompareFiles().setAttribute("ATR").relative("/src/main/resources/dogs.yaml"); executionResult = compareFiles.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")); compareFiles = new CompareFiles().setAttribute("ATR").relative("/src/main/resources/another_inexistent_file.yaml"); executionResult = compareFiles.execution(transformedAppFolder, transformationContext); Assert.assertEquals(executionResult.getType(), TUExecutionResult.Type.VALUE); Assert.assertTrue((Boolean) executionResult.getValue()); Mockito.when(transformationContext.get("ATR")).thenReturn(new File(transformedAppFolder, "/src/main/resources/dogs.yaml")); compareFiles = new CompareFiles().setAttribute("ATR").relative("/src/main/resources/another_inexistent_file.yaml"); executionResult = compareFiles.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); }
CompareFiles extends DoubleCondition<CompareFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } }
CompareFiles extends DoubleCondition<CompareFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareFiles();  CompareFiles(String attribute); }
CompareFiles extends DoubleCondition<CompareFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareFiles();  CompareFiles(String attribute); @Override String getDescription(); }
CompareFiles extends DoubleCondition<CompareFiles> { @Override protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) { return super.execution(transformedAppFolder, transformationContext); } CompareFiles();  CompareFiles(String attribute); @Override String getDescription();  }