Beispiel #1
0
  /**
   * Find the pending or ignored test outcomes in this set
   *
   * @return A new set of test outcomes containing only the pending or ignored tests
   */
  @SuppressWarnings("unchecked")
  public TestOutcomes getPendingTests() {

    List<TestOutcome> pendingOrSkippedOutcomes = outcomesWithResults(outcomes, PENDING, SKIPPED);
    return TestOutcomes.of(pendingOrSkippedOutcomes)
        .withLabel(labelForTestsWithStatus("pending tests"))
        .withRootOutcomes(getRootOutcomes());
  }
Beispiel #2
0
 /**
  * Find the successful test outcomes in this set
  *
  * @return A new set of test outcomes containing only the successful tests
  */
 public TestOutcomes getPassingTests() {
   return TestOutcomes.of(filter(withResult(TestResult.SUCCESS), outcomes))
       .withLabel(labelForTestsWithStatus("passing tests"))
       .withRootOutcomes(getRootOutcomes());
 }
Beispiel #3
0
 /**
  * Find the failing test outcomes in this set
  *
  * @return A new set of test outcomes containing only the failing tests
  */
 public TestOutcomes getFailingTests() {
   return TestOutcomes.of(filter(withResult(TestResult.FAILURE), outcomes))
       .withLabel(labelForTestsWithStatus("failing tests"))
       .withRootOutcomes(getRootOutcomes());
 }
Beispiel #4
0
 /**
  * Return a copy of the current test outcomes, with test run history and statistics.
  *
  * @return a TestOutcome instance containing a list of TestOutcomeWithHistory instances.
  */
 public TestOutcomes withHistory() {
   return TestOutcomes.of(convert(outcomes, toOutcomesWithHistory()));
 }
Beispiel #5
0
 public TestOutcomes withTag(TestTag tag) {
   return TestOutcomes.of(filter(havingTag(tag), outcomes))
       .withLabel(tag.getName())
       .withRootOutcomes(getRootOutcomes());
 }
Beispiel #6
0
 /**
  * Find the test outcomes with a given tag name
  *
  * @param tagName the name of the tag type we are filtering on
  * @return A new set of test outcomes for this tag name
  */
 public TestOutcomes withTag(String tagName) {
   return TestOutcomes.of(filter(havingTagName(tagName), outcomes))
       .withLabel(tagName)
       .withRootOutcomes(getRootOutcomes());
 }
Beispiel #7
0
 /**
  * Find the test outcomes with a given tag type
  *
  * @param tagType the tag type we are filtering on
  * @return A new set of test outcomes for this tag type
  */
 public TestOutcomes withTagType(String tagType) {
   return TestOutcomes.of(filter(havingTagType(tagType), outcomes))
       .withLabel(tagType)
       .withRootOutcomes(this.getRootOutcomes());
 }