private List<TestResultContainer> findParents(final List<TestResultContainer> groups, final String id, final Set<String> seen) { return groups.stream() .filter(container -> container.getChildren().contains(id)) .filter(container -> !seen.contains(container.getUuid())) .collect(Collectors.toList()); }
public TestResultContainer withChildren(String... values) { if (values!= null) { for (String value: values) { getChildren().add(value); } } return this; }
public TestResultContainer setChildren(final String... values) { if (values != null) { for (String value : values) { getChildren().add(value); } } return this; }
public TestResultContainer withChildren(Collection<String> values) { if (values!= null) { getChildren().addAll(values); } return this; }
public TestResultContainer setChildren(final Collection<String> values) { if (values != null) { getChildren().addAll(values); } return this; }
private List<TestResultContainer> findParents(final List<TestResultContainer> groups, final String id, final Set<String> seen) { return groups.stream() .filter(container -> container.getChildren().contains(id)) .filter(container -> !seen.contains(container.getUuid())) .collect(Collectors.toList()); }
/** * Starts test container with specified parent container. * * @param containerUuid the uuid of parent container. * @param container the container. */ public void startTestContainer(final String containerUuid, final TestResultContainer container) { storage.getContainer(containerUuid).ifPresent(parent -> { synchronized (storage) { parent.getChildren().add(container.getUuid()); } }); startTestContainer(container); }
/** * Schedules test case with given parent. * * @param containerUuid the uuid of container. * @param result the test case to schedule. */ public void scheduleTestCase(final String containerUuid, final TestResult result) { storage.getContainer(containerUuid).ifPresent(container -> { synchronized (storage) { container.getChildren().add(result.getUuid()); } }); scheduleTestCase(result); }