コード例 #1
0
  @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"))))));
  }
コード例 #2
0
  @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"))))));
  }