Package fitnesse.testsystems

Examples of fitnesse.testsystems.TestSummary


    assertFalse(report1.equals(report2));
  }

  @Test
  public void shouldNotBeEqualIfFinalCountsAreDifferent() throws Exception {
    report1.getFinalCounts().add(new TestSummary(1,2,3,4));
    report2.getFinalCounts().add(new TestSummary(4,3,2,1));
    assertFalse(report1.equals(report2));   
  }
View Full Code Here


  }

  @Test
  public void shouldBeEqualWithAllFieldsEqual() throws Exception {
    report1.date = report2.date = new Date(1);
    report1.getFinalCounts().add(new TestSummary(4,5,6,7));
    report2.getFinalCounts().add(new TestSummary(4,5,6,7));
    PageHistoryReference r1a = new PageHistoryReference("testPage", 1234, 5);
    PageHistoryReference r2a = new PageHistoryReference("testPage", 1234, 5);
    PageHistoryReference r1b = new PageHistoryReference("myPage", 7734, 6);
    PageHistoryReference r2b = new PageHistoryReference("myPage", 7734, 6);
    report1.addPageHistoryReference(r1a);
View Full Code Here

    client.done();
    client.join();
    assertFalse(exceptionOccurred);
    assertEquals(3, outputs.size());
    assertEquals(1, counts.size());
    TestSummary count = counts.get(0);
    assertEquals(1, count.getRight());
    assertEquals(1, count.getWrong());
    assertEquals(1, count.getExceptions());
  }
View Full Code Here

    public void setTags(String tags) {
      this.tags = tags;
    }

    public TestSummary getTestSummary() {
      return new TestSummary(
        Integer.parseInt(right),
        Integer.parseInt(wrong),
        Integer.parseInt(ignores),
        Integer.parseInt(exceptions)
      );
View Full Code Here

  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

  }

  @Test
  public void getAssertions() throws Exception {
    addDummyResult();
    assertEquals(expected.getAssertionCounts(), new TestSummary(1, 2, 3, 4));
  }
View Full Code Here

          if (fitOutput.byteCount() < size)
            throw new IOException("I was expecting " + size + " bytes but I only got " + fitOutput.byteCount());
          testOutputChunk(readValue);
        } else {
          Counts counts = FitProtocol.readCounts(fitOutput);
          testComplete(new TestSummary(counts.right, counts.wrong, counts.ignores, counts.exceptions));
          received++;
        }
      }
    }
View Full Code Here


  @Test
  public void testCompleteShouldAddPageAndSummaryAndTimingToResponse() throws Exception {
    WikiTestPage page = new WikiTestPage(new WikiPageDummy("page", "content", null), null);
    TestSummary summary = new TestSummary(1, 2, 3, 4);

    ChunkedResponse response = mock(ChunkedResponse.class);
    TestTextFormatter formatter = new TestTextFormatter(response);
    formatter.testStarted(page);
    clock.elapse(9800);
View Full Code Here

    Clock.restoreDefaultClock();
  }

  @Test
  public void testTestSummary() throws Exception {
    formatter.processTestResults("TestName", new TestSummary(49, 0, 0, 0));
    formatter.processTestResults("TestName2", new TestSummary(1, 0, 2, 0));
    formatter.processTestResults("TestName3", new TestSummary(1, 1, 0, 0));
    formatter.finishWritingOutput();

    assertSubString("<strong>Test Pages:</strong> 2 right, 1 wrong, 0 ignored, 0 exceptions", pageBuffer.toString());
    assertSubString("<strong>Assertions:</strong> 51 right, 1 wrong, 2 ignored, 0 exceptions", pageBuffer.toString());
  }
View Full Code Here

    assertSubString("<strong>Test Pages:</strong> 2 right, 1 wrong, 0 ignored, 0 exceptions", pageBuffer.toString());
    assertSubString("<strong>Assertions:</strong> 51 right, 1 wrong, 2 ignored, 0 exceptions", pageBuffer.toString());
  }

  private void testSuiteMetaTestSummaryWithTestResults(String pageName) throws Exception {
    formatter.processTestResults(pageName, new TestSummary(2, 0, 0, 0));
    formatter.finishWritingOutput();

    assertSubString("<span class=\\\"results pass\\\">2 right, 0 wrong, 0 ignored, 0 exceptions</span>", pageBuffer.toString());
    assertSubString("<strong>Test Pages:</strong> 1 right, 0 wrong, 0 ignored, 0 exceptions", pageBuffer.toString());
    assertSubString("<strong>Assertions:</strong> 2 right, 0 wrong, 0 ignored, 0 exceptions", pageBuffer.toString());
View Full Code Here

TOP

Related Classes of fitnesse.testsystems.TestSummary

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.