public static void assertFileEquals(Resource expected, Resource actual) throws Exception { assertFileEquals(expected.getFile(), actual.getFile()); }
private void executeAssertEquals(String expected, String actual) throws Exception { AssertFile.assertFileEquals(new FileSystemResource(DIRECTORY + expected), new FileSystemResource(DIRECTORY + actual)); }
/** * Output should be the same as input */ @Test public void testJob() throws Exception { jobLauncherTestUtils.launchJob(); AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE)); } }
@Test public void testJobLaunch() throws Exception { jobLauncherTestUtils.launchJob(); assertFileEquals(new ClassPathResource(EXPECTED), new FileSystemResource(ACTUAL)); }
/** * Output should be the same as input */ @Test public void testJob() throws Exception { jobLauncherTestUtils.launchJob(); AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE)); } }
public static void assertFileEquals(Resource expected, Resource actual) throws Exception { AssertFile.assertFileEquals(expected.getFile(), actual.getFile()); } }
@Test public void testValidRun() { try { JobExecution jobExecution = this.launchStep("step1"); //Ensure job completed successfully. Assert.isTrue(jobExecution.getExitStatus().equals(ExitStatus.COMPLETED), "Step Execution did not complete normally: " + jobExecution.getExitStatus()); //Check output. Assert.isTrue(actual.exists(), "Actual does not exist."); AssertFile.assertFileEquals(expected.getFile(), actual.getFile()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testValidRun() { try { JobExecution jobExecution = this.launchStep("step1"); //Ensure job completed successfully. Assert.isTrue(jobExecution.getExitStatus().equals(ExitStatus.COMPLETED), "Step Execution did not complete normally: " + jobExecution.getExitStatus()); //Check output. Assert.isTrue(actual.exists(), "Actual does not exist."); AssertFile.assertFileEquals(expected.getFile(), actual.getFile()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }