class InternalTestPlan extends TestPlan
| Modifier and Type | Field and Description |
|---|---|
private TestPlan |
delegate |
private static Logger |
logger |
private Root |
root |
private java.util.concurrent.atomic.AtomicBoolean |
warningEmitted |
| Modifier | Constructor and Description |
|---|---|
private |
InternalTestPlan(Root root,
TestPlan delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TestIdentifier testIdentifier)
Add the supplied
TestIdentifier to this test plan. |
(package private) void |
addInternal(TestIdentifier testIdentifier) |
boolean |
containsTests()
Return whether this test plan contains any tests.
|
long |
countTestIdentifiers(java.util.function.Predicate<? super TestIdentifier> predicate)
Count all
TestIdentifiers that satisfy the
given predicate. |
(package private) static InternalTestPlan |
from(Root root) |
java.util.Set<TestIdentifier> |
getChildren(java.lang.String parentId)
Get the children of the supplied unique ID.
|
java.util.Set<TestIdentifier> |
getChildren(TestIdentifier parent)
Get the children of the supplied
TestIdentifier. |
(package private) TestPlan |
getDelegate() |
java.util.Set<TestIdentifier> |
getDescendants(TestIdentifier parent)
Get all descendants of the supplied
TestIdentifier (i.e.,
all of its children and their children, recursively). |
java.util.Optional<TestIdentifier> |
getParent(TestIdentifier child)
Get the parent of the supplied
TestIdentifier. |
(package private) Root |
getRoot() |
java.util.Set<TestIdentifier> |
getRoots()
Get the root
TestIdentifiers for this test plan. |
TestIdentifier |
getTestIdentifier(java.lang.String uniqueId)
Get the
TestIdentifier with the supplied unique ID. |
private static final Logger logger
private final java.util.concurrent.atomic.AtomicBoolean warningEmitted
private final Root root
private final TestPlan delegate
static InternalTestPlan from(Root root)
Root getRoot()
TestPlan getDelegate()
public void add(TestIdentifier testIdentifier)
TestPlanTestIdentifier to this test plan.void addInternal(TestIdentifier testIdentifier)
public java.util.Set<TestIdentifier> getRoots()
TestPlanTestIdentifiers for this test plan.public java.util.Optional<TestIdentifier> getParent(TestIdentifier child)
TestPlanTestIdentifier.public java.util.Set<TestIdentifier> getChildren(TestIdentifier parent)
TestPlanTestIdentifier.getChildren in class TestPlanparent - the identifier to look up the children for; never nullTestPlan.getChildren(String)public java.util.Set<TestIdentifier> getChildren(java.lang.String parentId)
TestPlangetChildren in class TestPlanparentId - the unique ID to look up the children for; never
null or blankTestPlan.getChildren(TestIdentifier)public TestIdentifier getTestIdentifier(java.lang.String uniqueId) throws PreconditionViolationException
TestPlanTestIdentifier with the supplied unique ID.getTestIdentifier in class TestPlanuniqueId - the unique ID to look up the identifier for; never
null or blanknullPreconditionViolationException - if no TestIdentifier
with the supplied unique ID is present in this test planpublic long countTestIdentifiers(java.util.function.Predicate<? super TestIdentifier> predicate)
TestPlanTestIdentifiers that satisfy the
given predicate.countTestIdentifiers in class TestPlanpredicate - a predicate which returns true for identifiers
to be counted; never nullpublic java.util.Set<TestIdentifier> getDescendants(TestIdentifier parent)
TestPlanTestIdentifier (i.e.,
all of its children and their children, recursively).getDescendants in class TestPlanparent - the identifier to look up the descendants for; never nullpublic boolean containsTests()
TestPlanA test plan contains tests, if at least one of the contained engine descriptors contains tests.
containsTests in class TestPlantrue if this test plan contains testsTestDescriptor.containsTests(TestDescriptor)