assertEquals(1, testRun.getTestCases().size());
com.vividsolutions.jtstest.testrunner.TestCase testCase = (com.vividsolutions.jtstest.testrunner.TestCase) testRun.getTestCases().get(0);
assertTrue(testCase.getGeometryA().equals(new GeometryFactory().createPoint(new Coordinate(10, 20))));
assertTrue(testCase.getGeometryB().equals(new GeometryFactory().createPoint(new Coordinate(30, 40))));
XMLTestWriter xmlTestWriter = new XMLTestWriter();
String expectedXML =
"<case>" + StringUtil.newLine +
" <desc>same point</desc>" + StringUtil.newLine +
" <a file=\"\\\\pluto\\data\\jts\\testing\\testreader_wktfile_point.xml\"/>" + StringUtil.newLine +
" <b>" + StringUtil.newLine +
" POINT (30 40)" + StringUtil.newLine +
" </b>" + StringUtil.newLine +
"<test>" + StringUtil.newLine +
" <op name=\"relate\" arg1=\"A\" arg2=\"B\" arg3=\"0FFFFFFF2\">" + StringUtil.newLine +
" true" + StringUtil.newLine +
" </op>" + StringUtil.newLine +
"</test>" + StringUtil.newLine +
"</case>" + StringUtil.newLine;
assertEquals(normalize(expectedXML), normalize(xmlTestWriter.getTestXML(new TestRunnerTestCaseAdapter(testCase))));
testCase.setGeometryA(new GeometryFactory().createPoint(new Coordinate(2, 3)));
expectedXML =
"<case>" + StringUtil.newLine +
" <desc>same point</desc>" + StringUtil.newLine +
" <a>" + StringUtil.newLine +
" POINT (2 3)" + StringUtil.newLine +
" </a>" + StringUtil.newLine +
" <b>" + StringUtil.newLine +
" POINT (30 40)" + StringUtil.newLine +
" </b>" + StringUtil.newLine +
"<test>" + StringUtil.newLine +
" <op name=\"relate\" arg1=\"A\" arg2=\"B\" arg3=\"0FFFFFFF2\">" + StringUtil.newLine +
" true" + StringUtil.newLine +
" </op>" + StringUtil.newLine +
"</test>" + StringUtil.newLine +
"</case>" + StringUtil.newLine;
assertEquals(normalize(expectedXML), normalize(xmlTestWriter.getTestXML(new TestRunnerTestCaseAdapter(testCase))));
}