private boolean compatibleTag(TestTag tag) { if (nameMatcher.isPresent()) { if (!matches(tag.getName(), nameMatcher.get())) { return false; } } if (typeMatcher.isPresent()) { if (!typeMatcher.get().matches(tag.getType())) { return false; } } return true; }
public TestOutcomeMatcher withName(String name) { return withName(is(name)); }
public TestOutcomeMatcher withType(String type) { return withType(is(type)); }
private Release extractReleaseFor(TestTag releaseTag, TestOutcomes testOutcomes, int level, List<Release> parents) { Release release = new Release(releaseTag); String reportName = reportNameProvider.forRelease(release); release = release.withReport(reportName).withParents(parents); List<Release> ancestors = ancestorsFor(release); if (level < releaseTypes.size()) { String childReleaseType = releaseTypes.get(level); List<TestTag> childReleaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(childReleaseType)) .list(); List<Release> children = new ArrayList<>(); for (TestTag tag : childReleaseTags) { children.add(extractReleaseFor(tag, testOutcomes.withTag(tag), level + 1, ancestors)); } release = release.withChildren(children); } return release; }
private Release extractReleaseFor(TestTag releaseTag, TestOutcomes testOutcomes, int level, List<Release> parents) { Release release = new Release(releaseTag); String reportName = reportNameProvider.forRelease(release); release = release.withReport(reportName).withParents(parents); List<Release> ancestors = ancestorsFor(release); if (level < releaseTypes.size()) { String childReleaseType = releaseTypes.get(level); List<TestTag> childReleaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(childReleaseType)) .list(); List<Release> children = Lists.newArrayList(); for (TestTag tag : childReleaseTags) { children.add(extractReleaseFor(tag, testOutcomes.withTag(tag), level + 1, ancestors)); } release = release.withChildren(children); } return release; }
private Release extractReleaseFor(TestTag releaseTag, TestOutcomes testOutcomes, int level, List<Release> parents) { Release release = new Release(releaseTag); String reportName = reportNameProvider.forRelease(release); release = release.withReport(reportName).withParents(parents); List<Release> ancestors = ancestorsFor(release); if (level < releaseTypes.size()) { String childReleaseType = releaseTypes.get(level); List<TestTag> childReleaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(childReleaseType)) .list(); List<Release> children = Lists.newArrayList(); for (TestTag tag : childReleaseTags) { children.add(extractReleaseFor(tag, testOutcomes.withTag(tag), level + 1, ancestors)); } release = release.withChildren(children); } return release; }
public TestOutcomeMatcher withName(String name) { return withName(is(name)); }
public TestOutcomeMatcher findMatchingTags() { return new TestOutcomeMatcher(this); }
public TestOutcomeMatcher findMatchingTags() { return new TestOutcomeMatcher(this); }
private boolean compatibleTag(TestTag tag) { if (nameMatcher != null) { if (!matches(tag.getName(), nameMatcher)) { return false; } } if (typeMatcher != null) { if (!typeMatcher.matches(tag.getType())) { return false; } } return true; }
public TestOutcomeMatcher withType(String type) { return withType(is(type)); }
public TestOutcomeMatcher withType(String type) { return withType(is(type)); }
public TestOutcomeMatcher findMatchingTags() { return new TestOutcomeMatcher(this); }
public TestOutcomeMatcher withName(String name) { return withName(is(name)); }
private boolean compatibleTag(TestTag tag) { if (nameMatcher.isPresent()) { if (!matches(tag.getName(), nameMatcher.get())) { return false; } } if (typeMatcher.isPresent()) { if (!typeMatcher.get().matches(tag.getType())) { return false; } } return true; }
public List<TestTag> list() { List<TestTag> matches = Lists.newArrayList(); for(TestTag tag : outcomes.getTags()) { if (compatibleTag(tag)) { matches.add(tag); } } Collections.sort(matches); return matches; }
private List<Release> extractReleasesFromTestOutcomeAnnotations(TestOutcomes testOutcomes) { List<Release> releases = new ArrayList<>(); List<TestTag> releaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(releaseTypes.get(0))) .list(); for (TestTag tag : releaseTags) { releases.add(extractReleaseFor(tag, testOutcomes.withTag(tag), 1, NO_PARENTS)); } return releases; }
private List<Release> extractReleasesFromTestOutcomeAnnotations(TestOutcomes testOutcomes) { List<Release> releases = Lists.newArrayList(); List<TestTag> releaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(releaseTypes.get(0))) .list(); for (TestTag tag : releaseTags) { releases.add(extractReleaseFor(tag, testOutcomes.withTag(tag), 1, NO_PARENTS)); } return releases; }
private List<Release> extractReleasesFromTestOutcomeAnnotations(TestOutcomes testOutcomes) { List<Release> releases = Lists.newArrayList(); List<TestTag> releaseTags = testOutcomes.findMatchingTags() .withType("version") .withNameIn(matchingNames(releaseTypes.get(0))) .list(); for (TestTag tag : releaseTags) { releases.add(extractReleaseFor(tag, testOutcomes.withTag(tag), 1, NO_PARENTS)); } return releases; }
public List<TestTag> list() { List<TestTag> matches = Lists.newArrayList(); for(TestTag tag : outcomes.getTags()) { if (compatibleTag(tag)) { matches.add(tag); } } Collections.sort(matches); return matches; }