Esempio n. 1
0
  @Test
  public void canReadTestExecutionReport() throws Exception {
    TestExecutionReport original = new TestExecutionReport();
    original.version = "version";
    original.rootPath = "rootPath";

    StringWriter writer = new StringWriter();
    original.toXml(writer, VelocityFactory.getVelocityEngine());
    ExecutionReport report = ExecutionReport.makeReport(writer.toString());
    assertTrue(report instanceof TestExecutionReport);
  }
  @Test
  public void canReadTestExecutionReport() throws Exception {
    TestExecutionReport original =
        new TestExecutionReport(new FitNesseVersion("version"), "rootPath");
    original.setTotalRunTimeInMillis(totalTimeMeasurementWithElapsedMillis(42));

    StringWriter writer = new StringWriter();
    original.toXml(writer, context.pageFactory.getVelocityEngine());
    ExecutionReport report = ExecutionReport.makeReport(writer.toString());
    assertTrue(report instanceof TestExecutionReport);
    assertEquals(original, report);
    assertEquals(42, report.getTotalRunTimeInMillis());
  }