From: <bo...@us...> - 2009-06-19 11:20:46
|
Revision: 349 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=349&view=rev Author: bodewig Date: 2009-06-19 11:20:40 +0000 (Fri, 19 Jun 2009) Log Message: ----------- whitespace Modified Paths: -------------- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java 2009-06-19 11:14:53 UTC (rev 348) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java 2009-06-19 11:20:40 UTC (rev 349) @@ -908,6 +908,5 @@ ElementNameAndAttributeQualifier()); assertTrue(diff.toString(), diff.similar()); } - } Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2009-06-19 11:14:53 UTC (rev 348) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2009-06-19 11:20:40 UTC (rev 349) @@ -65,7 +65,7 @@ private CollectingDifferenceListener listener; private DifferenceEngine engine; private Document document; - + private final ComparisonController PSEUDO_DIFF = new SimpleComparisonController(); private final ComparisonController PSEUDO_DETAILED_DIFF = new NeverHaltingComparisonController(); @@ -508,7 +508,7 @@ fail("Not expecting difference found exception"); } } - + public void testXpathLocation1() throws Exception { String control = "<dvorak><keyboard/><composer/></dvorak>"; String test = "<qwerty><keyboard/></qwerty>"; @@ -516,64 +516,64 @@ assertEquals("1st control xpath", "/dvorak[1]", listener.controlXpath); assertEquals("1st test xpath", "/qwerty[1]", listener.testXpath); } - - public void testXpathLocation2() throws Exception { + + public void testXpathLocation2() throws Exception { String control = "<dvorak><keyboard/><composer/></dvorak>"; String test = "<qwerty><keyboard/></qwerty>"; String start = "<a>", end = "</a>"; listenToDifferences(start + control + end, start + test + end); assertEquals("2nd control xpath", "/a[1]/dvorak[1]", listener.controlXpath); - assertEquals("2nd test xpath", "/a[1]/qwerty[1]", listener.testXpath); + assertEquals("2nd test xpath", "/a[1]/qwerty[1]", listener.testXpath); } - + public void testXpathLocation3() throws Exception { String control = "<stuff><wood type=\"rough\"/></stuff>"; String test = "<stuff><wood type=\"smooth\"/></stuff>"; listenToDifferences(control, test); assertEquals("3rd control xpath", "/stuff[1]/wood[1]/@type", listener.controlXpath); - assertEquals("3rd test xpath", "/stuff[1]/wood[1]/@type", listener.testXpath); + assertEquals("3rd test xpath", "/stuff[1]/wood[1]/@type", listener.testXpath); } - + public void testXpathLocation4() throws Exception { String control = "<stuff><glass colour=\"clear\"/><glass colour=\"green\"/></stuff>"; String test = "<stuff><glass colour=\"clear\"/><glass colour=\"blue\"/></stuff>";; listenToDifferences(control, test); assertEquals("4th control xpath", "/stuff[1]/glass[2]/@colour", listener.controlXpath); - assertEquals("4th test xpath", "/stuff[1]/glass[2]/@colour", listener.testXpath); + assertEquals("4th test xpath", "/stuff[1]/glass[2]/@colour", listener.testXpath); } - + public void testXpathLocation5() throws Exception { String control = "<stuff><wood>maple</wood><wood>oak</wood></stuff>"; String test = "<stuff><wood>maple</wood><wood>ash</wood></stuff>"; listenToDifferences(control, test); assertEquals("5th control xpath", "/stuff[1]/wood[2]/text()[1]", listener.controlXpath); - assertEquals("5th test xpath", "/stuff[1]/wood[2]/text()[1]", listener.testXpath); + assertEquals("5th test xpath", "/stuff[1]/wood[2]/text()[1]", listener.testXpath); } - + public void testXpathLocation6() throws Exception { String control = "<stuff><list><wood/><glass/></list><item/></stuff>"; String test = "<stuff><list><wood/><glass/></list><item>description</item></stuff>"; listenToDifferences(control, test); assertEquals("6th control xpath", "/stuff[1]/item[1]", listener.controlXpath); - assertEquals("6th test xpath", "/stuff[1]/item[1]", listener.testXpath); + assertEquals("6th test xpath", "/stuff[1]/item[1]", listener.testXpath); } - + public void testXpathLocation7() throws Exception { String control = "<stuff><list><wood/></list></stuff>"; String test = "<stuff><list><glass/></list></stuff>"; listenToDifferences(control, test); assertEquals("7th control xpath", "/stuff[1]/list[1]/wood[1]", listener.controlXpath); - assertEquals("7th test xpath", "/stuff[1]/list[1]/glass[1]", listener.testXpath); + assertEquals("7th test xpath", "/stuff[1]/list[1]/glass[1]", listener.testXpath); } - + public void testXpathLocation8() throws Exception { String control = "<stuff><list><!--wood--></list></stuff>"; String test = "<stuff><list><!--glass--></list></stuff>"; listenToDifferences(control, test); assertEquals("8th control xpath", "/stuff[1]/list[1]/comment()[1]", listener.controlXpath); - assertEquals("8th test xpath", "/stuff[1]/list[1]/comment()[1]", listener.testXpath); + assertEquals("8th test xpath", "/stuff[1]/list[1]/comment()[1]", listener.testXpath); } - + public void testXpathLocation9() throws Exception { String control = "<stuff><list/><?wood rough?><list/></stuff>"; String test = "<stuff><list/><?glass clear?><list/></stuff>"; @@ -581,9 +581,9 @@ assertEquals("9th control xpath", "/stuff[1]/processing-instruction()[1]", listener.controlXpath); assertEquals("9th test xpath", "/stuff[1]/processing-instruction()[1]", - listener.testXpath); + listener.testXpath); } - + public void testXpathLocation10() throws Exception { String control = "<stuff><list/>list<![CDATA[wood]]></stuff>"; String test = "<stuff><list/>list<![CDATA[glass]]></stuff>"; @@ -591,9 +591,9 @@ assertEquals("10th control xpath", "/stuff[1]/text()[2]", listener.controlXpath); assertEquals("10th test xpath", "/stuff[1]/text()[2]", - listener.testXpath); + listener.testXpath); } - + public void testXpathLocation11() throws Exception { String control = "<stuff><list><item/></list></stuff>"; String test = "<stuff><list>item text</list></stuff>"; @@ -601,7 +601,7 @@ assertEquals("11th control xpath", "/stuff[1]/list[1]/item[1]", listener.controlXpath); assertEquals("11th test xpath", "/stuff[1]/list[1]/text()[1]", - listener.testXpath); + listener.testXpath); } public void testXpathLocation12() throws Exception { @@ -612,7 +612,7 @@ assertEquals("12th control xpath", "/stuff[1]/item[2]", listener.controlXpath); assertEquals("12th test xpath", "/stuff[1]/item[1]", - listener.testXpath); + listener.testXpath); } public void testXpathLocation13() throws Exception { @@ -626,7 +626,7 @@ listener.comparingWhat); assertEquals("13th control xpath", "/stuff[1]/item[2]", listener.controlXpath); - assertNull("13th test xpath", listener.testXpath); + assertNull("13th test xpath", listener.testXpath); } public void testXpathLocation14() throws Exception { @@ -637,7 +637,7 @@ assertEquals("14th control xpath", "/stuff[1]/item[1]/@id", listener.controlXpath); assertEquals("14th test xpath", "/stuff[1]/item[2]/@id", - listener.testXpath); + listener.testXpath); } public void testIssue1027863() throws Exception { @@ -655,7 +655,7 @@ assertEquals("15th control xpath", "/stuff[1]/item[1]", listener.controlXpath); assertEquals("15th test xpath", "/stuff[1]/item[1]", - listener.testXpath); + listener.testXpath); } public void testNormalizeWhitespace() { @@ -935,8 +935,8 @@ Document testDoc = XMLUnit.buildTestDocument(test); engine.compare(controlDoc, testDoc, listener, DEFAULT_ELEMENT_QUALIFIER); } - + private void resetListener() { listener = new CollectingDifferenceListener(); } @@ -953,13 +953,13 @@ return !afterDifference.isRecoverable(); } } - + private class NeverHaltingComparisonController implements ComparisonController { public boolean haltComparison(Difference afterDifference) { return false; } } - + private class CollectingDifferenceListener implements DifferenceListener { public String expected; public String actual; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |