@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(); original.version = "version"; original.rootPath = "rootPath"; original.setTotalRunTimeInMillis(totalTimeMeasurementWithElapsedMillis(42)); StringWriter writer = new StringWriter(); original.toXml(writer, VelocityFactory.getVelocityEngine()); ExecutionReport report = ExecutionReport.makeReport(writer.toString()); assertTrue(report instanceof TestExecutionReport); assertEquals(original, report); assertEquals(42, report.getTotalRunTimeInMillis()); }