/** * 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) { List<TestOutcome> testOutcomesWithTags = outcomes.stream() .filter(outcome -> outcome.hasTagWithName(tagName)) .collect(Collectors.toList()); return TestOutcomes.of(testOutcomesWithTags).withLabel(tagName).withRootOutcomes(getRootOutcomes()); }
public TestOutcomes withTagTypes(List<String> tagTypes) { List<TestOutcome> testOutcomesWithTags = outcomes.stream() .filter(outcome -> outcome.hasTagWithTypes(tagTypes)) .collect(Collectors.toList()); return TestOutcomes.of(testOutcomesWithTags).withLabel(Joiner.on(",").join(tagTypes)) .withRootOutcomes(getRootOutcomes()); }
/** * 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()); }
/** * 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()); }
/** * Find the pending or ignored test outcomes in this set * * @return A new set of test outcomes containing only the pending or ignored tests */ public TestOutcomes getPendingTests() { List<TestOutcome> pendingOrSkippedOutcomes = outcomesWithResults(outcomes, PENDING, SKIPPED); return TestOutcomes.of(pendingOrSkippedOutcomes) .withLabel(labelForTestsWithStatus("pending tests")) .withRootOutcomes(getRootOutcomes()); }
/** * 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()); }
/** * 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()); }
public TestOutcomes withTag(TestTag tag) { List<? extends TestOutcome> matchingTags = matchingOutcomes(outcomes, tag); return TestOutcomes.of(matchingTags).withLabel(tag.getName()).withRootOutcomes(getRootOutcomes()); }
/** * Find the pending or ignored test outcomes in this set * * @return A new set of test outcomes containing only the pending or ignored tests */ public TestOutcomes getPendingTests() { List<TestOutcome> pendingOrSkippedOutcomes = outcomesWithResults(outcomes, PENDING, SKIPPED); return TestOutcomes.of(pendingOrSkippedOutcomes) .withLabel(labelForTestsWithStatus("pending tests")) .withRootOutcomes(getRootOutcomes()); }
/** * 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(outcomesFilteredByResult(TestResult.SUCCESS)) .withLabel(labelForTestsWithStatus("passing tests")) .withResultFilter(TestResult.SUCCESS) .withRootOutcomes(getRootOutcomes()); }
public TestOutcomes getErrorTests() { return TestOutcomes.of(filter(withResult(TestResult.ERROR), outcomes)) .withLabel(labelForTestsWithStatus("failing tests")) .withRootOutcomes(getRootOutcomes()); }
public TestOutcomes getErrorTests() { return TestOutcomes.of(filter(withResult(TestResult.ERROR), outcomes)) .withLabel(labelForTestsWithStatus("failing tests")) .withRootOutcomes(getRootOutcomes()); }
/** * 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()); }
/** * 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()); }
public TestOutcomes getErrorTests() { return TestOutcomes.of(outcomesFilteredByResult(TestResult.ERROR)) .withLabel(labelForTestsWithStatus("tests with errors")) .withResultFilter(TestResult.ERROR) .withRootOutcomes(getRootOutcomes()); }
/** * Find the pending or ignored test outcomes in this set * * @return A new set of test outcomes containing only the pending or ignored tests */ public TestOutcomes getPendingTests() { List<TestOutcome> pendingOutcomes = outcomesWithResults(outcomes, TestResult.PENDING); return TestOutcomes.of(pendingOutcomes) .withLabel(labelForTestsWithStatus("pending tests")) .withResultFilter(TestResult.PENDING) .withRootOutcomes(getRootOutcomes()); }
/** * 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()); }
public TestOutcomes havingResult(TestResult result) { return TestOutcomes.of(filter(withResult(result), outcomes)) .withLabel(labelForTestsWithStatus(result.name())) .withRootOutcomes(getRootOutcomes()); }
public TestOutcomes havingResult(TestResult result) { return TestOutcomes.of(filter(withResult(result), outcomes)) .withLabel(labelForTestsWithStatus(result.name())) .withRootOutcomes(getRootOutcomes()); }
public TestOutcomes withCardNumber(String issueCardNumber) { List<? extends TestOutcome> outcomesWithMatchingTag = matchingOutcomes(outcomes, TestTag.withName(issueCardNumber).andType("issue")); return TestOutcomes.of(outcomesWithMatchingTag) .withTestTag(TestTag.withName(issueCardNumber).andType("issue")) .withRootOutcomes(getRootOutcomes()); } private TestOutcomes withTestTag(TestTag tag) {