public void testBuildFailureResultFromString() {
TestCaseResult result = TestCaseResult.fromString("file:///dummy/path/dummyPage.html:testFoo|1.3|F|Test Failure Message|");
assertEquals("file:///dummy/path/dummyPage.html:testFoo", result.getName());
assertEquals(1.3d, result.getTime(), .001d);
assertFalse(result.hadError());
assertTrue(result.hadFailure());
assertFalse(result.hadSuccess());
assertNull(result.getError());
assertEquals("Test Failure Message", result.getFailure());
assertEquals("<testcase name=\"file:///dummy/path/dummyPage.html:testFoo\" time=\"1.3\"><failure message=\"Test Failure Message\" /></testcase>", result.writeXmlFragment());
}