assertEquals("<testcase name=\"file:///dummy/path/dummyPage.html:testFoo\" time=\"1.3\"><failure message=\"Test Failure Message\" /></testcase>", result.writeXmlFragment());
}
public void testBuildFromXmlFragment() {
TestCaseResult result = TestCaseResult.fromString("file:///dummy/path/dummyPage.html:testFoo|1.3|F|Test Failure Message|");
Element element = new TestCaseResultWriter(result).createTestCaseElement();
TestCaseResult reconstitutedResult = TestCaseResult.fromXmlElement(element);
assertEquals("file:///dummy/path/dummyPage.html:testFoo", reconstitutedResult.getName());
assertEquals(1.3d, reconstitutedResult.getTime(), .001d);
assertFalse(reconstitutedResult.hadError());
assertTrue(reconstitutedResult.hadFailure());