Package fitnesse

Examples of fitnesse.FitNesseVersion


   
    String output = suiteOutputAsString();
    Document document = XmlUtil.newDocument(output);
    Element suiteResultsElement = document.getDocumentElement();
    assertEquals("suiteResults", suiteResultsElement.getNodeName());
    assertEquals(new FitNesseVersion().toString(), XmlUtil.getTextValue(suiteResultsElement, "FitNesseVersion"));
    assertEquals("SuitePage", XmlUtil.getTextValue(suiteResultsElement, "rootPath"));

    NodeList xmlPageReferences = suiteResultsElement.getElementsByTagName("pageHistoryReference");
    assertEquals(1, xmlPageReferences.getLength());
    for (int referenceIndex = 0; referenceIndex < xmlPageReferences.getLength(); referenceIndex++) {
View Full Code Here


    context = FitNesseUtil.makeTestContext(root);
  }

  @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());
View Full Code Here

    };
  }

  @Test
  public void canMakeSuiteExecutionReport() throws Exception {
    SuiteExecutionReport original = new SuiteExecutionReport(new FitNesseVersion("version"), "rootPath");
    original.date = DateTimeUtil.getDateFromString("12/31/1969 18:00:00");
    original.getFinalCounts().add(new TestSummary(1, 2, 3, 4));
    original.setTotalRunTimeInMillis(totalTimeMeasurementWithElapsedMillis(41));
    long time = DateTimeUtil.getTimeFromString("12/31/1969 18:00:00");
    SuiteExecutionReport.PageHistoryReference reference = new SuiteExecutionReport.PageHistoryReference("dah", time, 3L);
View Full Code Here

    assertEquals(41, report.getTotalRunTimeInMillis());
  }
 
  @Test
  public void shouldHandleMissingRunTimesGraceFully() throws Exception {
    TestExecutionReport report = new TestExecutionReport(new FitNesseVersion("version"), "rootPath");
    Element element = mock(Element.class);
    NodeList emptyNodeList = mock(NodeList.class);
    when(element.getElementsByTagName("totalRunTimeInMillis")).thenReturn(emptyNodeList);
    when(emptyNodeList.getLength()).thenReturn(0);
    assertThat(report.getTotalRunTimeInMillisOrZeroIfNotPresent(element), is(0L));
View Full Code Here

  private SuiteExecutionReport report1;
  private SuiteExecutionReport report2;

   @Before
  public void setUp() throws Exception {
    report1 = new SuiteExecutionReport(new FitNesseVersion("version"), "rootPath");
    report2 = new SuiteExecutionReport(new FitNesseVersion("version"), "rootPath");
  }
View Full Code Here

    report2 = new SuiteExecutionReport(new FitNesseVersion("version"), "rootPath");
  }

  @Test
  public void degeneratesShouldBeEqual() throws Exception {
    assertEquals(new SuiteExecutionReport(new FitNesseVersion("version"), "here"),
            new SuiteExecutionReport(new FitNesseVersion("version"), "here"));
  }
View Full Code Here

    assertEquals(new SuiteExecutionReport(new FitNesseVersion("version"), "here"),
            new SuiteExecutionReport(new FitNesseVersion("version"), "here"));
  }
  @Test
  public void shouldNotBeEqualIfDifferentTypes() throws Exception {
    assertFalse(new SuiteExecutionReport(new FitNesseVersion("version"), "here").equals(new Integer(0)));
  }
View Full Code Here

    assertFalse(new SuiteExecutionReport(new FitNesseVersion("version"), "here").equals(new Integer(0)));
  }

  @Test
  public void shouldNotBeEqualWithDifferentRootPaths()throws Exception  {
    SuiteExecutionReport report1 = new SuiteExecutionReport(new FitNesseVersion("version"), "here");
    SuiteExecutionReport report2 = new SuiteExecutionReport(new FitNesseVersion("version"), "there");
    assertFalse(report1.equals(report2));
  }
View Full Code Here

    assertEquals(report1, report2);
  }

  @Test
  public void shouldNotBeEqualIfVersionIsDifferent() throws Exception {
    report1 = new SuiteExecutionReport(new FitNesseVersion("x"), "rootPath");
    report2 = new SuiteExecutionReport(new FitNesseVersion("y"), "rootPath");
    assertFalse(report1.equals(report2));
  }
View Full Code Here

  private TestExecutionReport actual;
  private TestResult result;

  @Before
  public void setup() throws Exception {
    expected = new TestExecutionReport(new FitNesseVersion("version"), "rootPath");
    expected.getFinalCounts().add(new TestSummary(1, 2, 3, 4));
    context = FitNesseUtil.makeTestContext(InMemoryPage.makeRoot("RooT"));
  }
View Full Code Here

TOP

Related Classes of fitnesse.FitNesseVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.