@Test public void testAddExceptionOnStart() { reportingSystem = new FitFixtureReportingSystem(new Fixture(), table); reportingSystem.addException(new Exception("Cruel World!")); assertThat( table, isParseThat() .withRecursiveChildren() .withRecursiveSiblings() .which( allOf( hasTagThat(containsString("<td")), hasBodyThat( allOf(containsString("Cruel World!"), containsString("stacktrace")))))); }
@Test public void testAddExceptionWhileInTheMiddleOfRow() { reportingSystem = new FitFixtureReportingSystem(new Fixture(), table); reportingSystem.addCell(createCellResult("*S-1*", SUCCESS)); reportingSystem.addException(new Exception("Cruel World!")); assertThat( table, isParseThat() .withRecursiveChildren() .withRecursiveSiblings() .which( allOf( hasTagThat(containsString("<td")), hasBodyThat( allOf(containsString("Cruel World!"), containsString("stacktrace")))))); }