/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getMostSpecificTagsOfType(String tagType) { return outcomes.stream() .flatMap(outcome -> removeGeneralTagsFrom(tagsOfType(tagType).in(outcome))) .sorted() .collect(Collectors.toList()); }
/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getTagsOfType(String tagType) { return outcomes.stream() .flatMap(outcome -> tagsOfType(tagType).from(outcome)) .distinct() .sorted() .collect(Collectors.toList()); }
private TagFinder tagsOfType(String tagType) { return new TagFinder(tagType); }
private TagFinder tagsOfType(String tagType) { return new TagFinder(tagType); }
/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getMostSpecificTagsOfType(String tagType) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { List<TestTag> mostSpecificOutcomeTags = removeGeneralTagsFrom(tagsOfType(tagType).in(outcome)); tags.addAll(mostSpecificOutcomeTags); } return sort(ImmutableList.copyOf(tags), on(String.class)); }
/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getTagsOfType(String tagType) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { tags.addAll(tagsOfType(tagType).in(outcome)); } return sort(ImmutableList.copyOf(tags), on(String.class)); }
private TagFinder tagsOfType(String tagType) { return new TagFinder(tagType); }
public List<TestTag> getTagsOfTypeExcluding(String tagType, String excludedTag) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { List<TestTag> allTagsOfType = removeGeneralTagsFrom(tagsOfType(tagType).in(outcome)); allTagsOfType = removeExcluded(allTagsOfType, excludedTag); tags.addAll(allTagsOfType); } return sort(ImmutableList.copyOf(tags), on(String.class)); }
/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getMostSpecificTagsOfType(String tagType) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { List<TestTag> mostSpecificOutcomeTags = removeGeneralTagsFrom(tagsOfType(tagType).in(outcome)); tags.addAll(mostSpecificOutcomeTags); } return sort(ImmutableList.copyOf(tags), on(String.class)); }
public List<TestTag> getTagsOfTypeExcluding(String tagType, String excludedTag) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { List<TestTag> allTagsOfType = removeGeneralTagsFrom(tagsOfType(tagType).in(outcome)); allTagsOfType = removeExcluded(allTagsOfType, excludedTag); tags.addAll(allTagsOfType); } return sort(ImmutableList.copyOf(tags), on(String.class)); }
public List<TestTag> getTagsOfTypeExcluding(String tagType, String excludedTag) { Predicate<TestTag> withExcludedTags = tag -> !tag.getName().equalsIgnoreCase(excludedTag); List<TestTag> allTags = outcomes.stream() .flatMap(outcome -> tagsOfType(tagType).from(outcome)) .collect(Collectors.toList()); return allTags.stream() .filter( tag -> !moreSpecificTagExists(tag, allTags) ) .filter( withExcludedTags ) .distinct() .sorted() .collect(Collectors.toList()); }
/** * @return The list of all the tags associated with a given tag type. */ public List<TestTag> getTagsOfType(String tagType) { Set<TestTag> tags = Sets.newHashSet(); for (TestOutcome outcome : outcomes) { tags.addAll(tagsOfType(tagType).in(outcome)); } return sort(ImmutableList.copyOf(tags), on(String.class)); }