public List<String> findAllLabels(final LabelName name) { return findAllLabels(name, Collectors.toList()); }
public List<String> findAllLabels(final String name) { return findAllLabels(name, Collectors.toList()); }
@Override public void aggregate(final Configuration configuration, final List<LaunchResults> launchesResults, final Path outputDirectory) { launchesResults.stream() .map(LaunchResults::getAllResults) .flatMap(Collection::stream) .forEach(result -> { final Set<String> tags = new HashSet<>(result.findAllLabels(LabelName.TAG)); result.addExtraBlock(TAGS_BLOCK_NAME, tags); }); } }
public <T> T findAllLabels(final LabelName name, final Collector<String, ?, T> collector) { return findAllLabels(name.value(), collector); }
@Test public void shouldFindAllWithNullValue() throws Exception { final TestResult result = new TestResult(); result.getLabels().add(new Label().setName("hey").setValue(null)); result.getLabels().add(new Label().setName("hey").setValue("a")); result.getLabels().add(new Label().setName("hey").setValue("b")); final List<String> found = result.findAllLabels("hey"); assertThat(found) .containsExactlyInAnyOrder(null, "a", "b"); } }
set.addAll(convert(source.getLabels(), this::convert)); dest.setLabels(new ArrayList<>(set)); dest.findAllLabels(ISSUE).forEach(issue -> dest.getLinks().add(getLink(ISSUE, issue, getIssueUrl(issue, properties))) ); dest.addLabelIfNotExists(TEST_METHOD, testMethod); dest.addLabelIfNotExists(PACKAGE, testClass); dest.findAllLabels("status_details").stream() .filter("flaky"::equalsIgnoreCase) .findAny()
public List<String> findAllLabels(final LabelName name) { return findAllLabels(name, Collectors.toList()); }
public List<String> findAllLabels(final String name) { return findAllLabels(name, Collectors.toList()); }
@Override public void aggregate(final Configuration configuration, final List<LaunchResults> launchesResults, final Path outputDirectory) { launchesResults.stream() .map(LaunchResults::getAllResults) .flatMap(Collection::stream) .forEach(result -> { final Set<String> tags = new HashSet<>(result.findAllLabels(LabelName.TAG)); result.addExtraBlock(TAGS_BLOCK_NAME, tags); }); } }
public <T> T findAllLabels(final LabelName name, final Collector<String, ?, T> collector) { return findAllLabels(name.value(), collector); }
set.addAll(convert(source.getLabels(), this::convert)); dest.setLabels(new ArrayList<>(set)); dest.findAllLabels(ISSUE).forEach(issue -> dest.getLinks().add(getLink(ISSUE, issue, getIssueUrl(issue, properties))) ); dest.addLabelIfNotExists(TEST_METHOD, testMethod); dest.addLabelIfNotExists(PACKAGE, testClass); dest.findAllLabels("status_details").stream() .filter("flaky"::equalsIgnoreCase) .findAny()