示例#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());
  }
示例#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());
 }
示例#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());
 }
示例#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()));
 }
示例#5
0
 public TestOutcomes withTag(TestTag tag) {
   return TestOutcomes.of(filter(havingTag(tag), outcomes))
       .withLabel(tag.getName())
       .withRootOutcomes(getRootOutcomes());
 }
示例#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());
 }
示例#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());
 }