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)
TestPlan
TestIdentifier
to this test plan.void addInternal(TestIdentifier testIdentifier)
public java.util.Set<TestIdentifier> getRoots()
TestPlan
TestIdentifiers
for this test plan.public java.util.Optional<TestIdentifier> getParent(TestIdentifier child)
TestPlan
TestIdentifier
.public java.util.Set<TestIdentifier> getChildren(TestIdentifier parent)
TestPlan
TestIdentifier
.getChildren
in class TestPlan
parent
- the identifier to look up the children for; never null
TestPlan.getChildren(String)
public java.util.Set<TestIdentifier> getChildren(java.lang.String parentId)
TestPlan
getChildren
in class TestPlan
parentId
- the unique ID to look up the children for; never
null
or blankTestPlan.getChildren(TestIdentifier)
public TestIdentifier getTestIdentifier(java.lang.String uniqueId) throws PreconditionViolationException
TestPlan
TestIdentifier
with the supplied unique ID.getTestIdentifier
in class TestPlan
uniqueId
- the unique ID to look up the identifier for; never
null
or blanknull
PreconditionViolationException
- if no TestIdentifier
with the supplied unique ID is present in this test planpublic long countTestIdentifiers(java.util.function.Predicate<? super TestIdentifier> predicate)
TestPlan
TestIdentifiers
that satisfy the
given predicate.countTestIdentifiers
in class TestPlan
predicate
- a predicate which returns true
for identifiers
to be counted; never null
public java.util.Set<TestIdentifier> getDescendants(TestIdentifier parent)
TestPlan
TestIdentifier
(i.e.,
all of its children and their children, recursively).getDescendants
in class TestPlan
parent
- the identifier to look up the descendants for; never null
public boolean containsTests()
TestPlan
A test plan contains tests, if at least one of the contained engine descriptors contains tests.
containsTests
in class TestPlan
true
if this test plan contains testsTestDescriptor.containsTests(TestDescriptor)