RESOLVED - BATCH-1021: AssertFile.assertFileEquals(File,File) parameters in the wrong order
applied patch
This commit is contained in:
@@ -42,6 +42,6 @@ public class MultiLineFunctionalTests extends AbstractJobTests {
|
||||
@Test
|
||||
public void testJob() throws Exception {
|
||||
this.launchJob();
|
||||
AssertFile.assertFileEquals(new FileSystemResource(OUTPUT_FILE), new FileSystemResource(INPUT_FILE));
|
||||
AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,6 @@ public class MultiRecordTypeFunctionalTests extends AbstractJobTests {
|
||||
@Test
|
||||
public void testJob() throws Exception {
|
||||
this.launchJob();
|
||||
AssertFile.assertFileEquals(new FileSystemResource(OUTPUT_FILE), new FileSystemResource(INPUT_FILE));
|
||||
AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.core.io.Resource;
|
||||
*/
|
||||
public abstract class AssertFile {
|
||||
|
||||
public static void assertFileEquals(File actual, File expected) throws Exception {
|
||||
public static void assertFileEquals(File expected, File actual) throws Exception {
|
||||
BufferedReader expectedReader = new BufferedReader(new FileReader(expected));
|
||||
BufferedReader actualReader = new BufferedReader(new FileReader(actual));
|
||||
try {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class AssertFileTests {
|
||||
@Test
|
||||
public void testAssertEquals_tooLong() throws Exception {
|
||||
try {
|
||||
executeAssertEquals("input1.txt", "input3.txt");
|
||||
executeAssertEquals("input3.txt", "input1.txt");
|
||||
fail();
|
||||
}
|
||||
catch (AssertionFailedError e) {
|
||||
@@ -46,7 +46,7 @@ public class AssertFileTests {
|
||||
@Test
|
||||
public void testAssertEquals_tooShort() throws Exception {
|
||||
try {
|
||||
executeAssertEquals("input3.txt", "input1.txt");
|
||||
executeAssertEquals("input1.txt", "input3.txt");
|
||||
fail();
|
||||
}
|
||||
catch (AssertionFailedError e) {
|
||||
@@ -62,7 +62,7 @@ public class AssertFileTests {
|
||||
@Test
|
||||
public void testAssertEquals_blank_tooLong() throws Exception {
|
||||
try {
|
||||
executeAssertEquals("input1.txt", "blank.txt");
|
||||
executeAssertEquals("blank.txt", "input1.txt");
|
||||
fail();
|
||||
}
|
||||
catch (AssertionFailedError e) {
|
||||
@@ -73,7 +73,7 @@ public class AssertFileTests {
|
||||
@Test
|
||||
public void testAssertEquals_blank_tooShort() throws Exception {
|
||||
try {
|
||||
executeAssertEquals("blank.txt", "input1.txt");
|
||||
executeAssertEquals("input1.txt", "blank.txt");
|
||||
fail();
|
||||
}
|
||||
catch (AssertionFailedError e) {
|
||||
|
||||
Reference in New Issue
Block a user