@Test public void testAssertEquals_blank_equal() throws Exception { executeAssertEquals("blank.txt", "blank.txt"); }
@Test public void testAssertEquals_equal() throws Exception { executeAssertEquals("input1.txt", "input1.txt"); }
@Test public void testAssertEquals_tooLong() throws Exception { try { executeAssertEquals("input3.txt", "input1.txt"); fail(); } catch (AssertionError e) { assertTrue(e.getMessage().startsWith("More lines than expected. There should not be a line number 4.")); } }
@Test public void testAssertEquals_tooShort() throws Exception { try { executeAssertEquals("input1.txt", "input3.txt"); fail(); } catch (AssertionError e) { assertTrue(e.getMessage().startsWith("Line number 4 does not match.")); } }
@Test public void testAssertEquals_blank_tooLong() throws Exception { try { executeAssertEquals("blank.txt", "input1.txt"); fail(); } catch (AssertionError e) { assertTrue(e.getMessage().startsWith("More lines than expected. There should not be a line number 1.")); } }
@Test public void testAssertEquals_blank_tooShort() throws Exception { try { executeAssertEquals("input1.txt", "blank.txt"); fail(); } catch (AssertionError e) { assertTrue(e.getMessage().startsWith("Line number 1 does not match.")); } }
@Test public void testAssertEquals_notEqual() throws Exception { try { executeAssertEquals("input1.txt", "input2.txt"); fail(); } catch (ComparisonFailure e) { assertTrue(e.getMessage().startsWith("Line number 3 does not match.")); } }