Package org.junit.platform.launcher.core
Class InternalTestPlan
java.lang.Object
org.junit.platform.launcher.TestPlan
org.junit.platform.launcher.core.InternalTestPlan
- Since:
- 1.4
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.platform.launcher.TestPlan
TestPlan.Visitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TestPlan
private final LauncherDiscoveryResult
private final AtomicBoolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
InternalTestPlan
(LauncherDiscoveryResult discoveryResult, TestPlan delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TestIdentifier testIdentifier) Add the suppliedTestIdentifier
to this test plan.void
addInternal
(TestIdentifier testIdentifier) boolean
Return whether this test plan contains any tests.long
countTestIdentifiers
(Predicate<? super TestIdentifier> predicate) Count allTestIdentifiers
that satisfy the given predicate.(package private) static InternalTestPlan
from
(LauncherDiscoveryResult discoveryResult) getChildren
(String parentId) Get the children of the supplied unique ID.getChildren
(UniqueId parentId) Get the children of the supplied unique ID.getChildren
(TestIdentifier parent) Get the children of the suppliedTestIdentifier
.getDescendants
(TestIdentifier parent) Get all descendants of the suppliedTestIdentifier
(i.e., all of its children and their children, recursively).(package private) LauncherDiscoveryResult
getParent
(TestIdentifier child) Get the parent of the suppliedTestIdentifier
.getRoots()
Get the rootTestIdentifiers
for this test plan.getTestIdentifier
(String uniqueId) Get theTestIdentifier
with the supplied unique ID.getTestIdentifier
(UniqueId uniqueId) Get theTestIdentifier
with the supplied unique ID.(package private) void
Methods inherited from class org.junit.platform.launcher.TestPlan
accept, from, getConfigurationParameters
-
Field Details
-
executionStarted
-
discoveryResult
-
delegate
-
-
Constructor Details
-
InternalTestPlan
-
-
Method Details
-
from
-
markStarted
void markStarted() -
getDiscoveryResult
LauncherDiscoveryResult getDiscoveryResult() -
getDelegate
-
add
Description copied from class:TestPlan
Add the suppliedTestIdentifier
to this test plan. -
addInternal
- Overrides:
addInternal
in classTestPlan
-
getRoots
Description copied from class:TestPlan
Get the rootTestIdentifiers
for this test plan. -
getParent
Description copied from class:TestPlan
Get the parent of the suppliedTestIdentifier
. -
getChildren
Description copied from class:TestPlan
Get the children of the suppliedTestIdentifier
.- Overrides:
getChildren
in classTestPlan
- Parameters:
parent
- the identifier to look up the children for; nevernull
- Returns:
- an unmodifiable set of the parent's children, potentially empty
- See Also:
-
getChildren
Description copied from class:TestPlan
Get the children of the supplied unique ID.- Overrides:
getChildren
in classTestPlan
- Parameters:
parentId
- the unique ID to look up the children for; nevernull
or blank- Returns:
- an unmodifiable set of the parent's children, potentially empty
- See Also:
-
getChildren
Description copied from class:TestPlan
Get the children of the supplied unique ID.- Overrides:
getChildren
in classTestPlan
- Parameters:
parentId
- the unique ID to look up the children for; nevernull
- Returns:
- an unmodifiable set of the parent's children, potentially empty
- See Also:
-
getTestIdentifier
public TestIdentifier getTestIdentifier(String uniqueId) throws org.junit.platform.commons.PreconditionViolationException Description copied from class:TestPlan
Get theTestIdentifier
with the supplied unique ID.- Overrides:
getTestIdentifier
in classTestPlan
- Parameters:
uniqueId
- the unique ID to look up the identifier for; nevernull
or blank- Returns:
- the identifier with the supplied unique ID; never
null
- Throws:
org.junit.platform.commons.PreconditionViolationException
- if noTestIdentifier
with the supplied unique ID is present in this test plan
-
getTestIdentifier
Description copied from class:TestPlan
Get theTestIdentifier
with the supplied unique ID.- Overrides:
getTestIdentifier
in classTestPlan
- Parameters:
uniqueId
- the unique ID to look up the identifier for; nevernull
- Returns:
- the identifier with the supplied unique ID; never
null
-
countTestIdentifiers
Description copied from class:TestPlan
Count allTestIdentifiers
that satisfy the given predicate.- Overrides:
countTestIdentifiers
in classTestPlan
- Parameters:
predicate
- a predicate which returnstrue
for identifiers to be counted; nevernull
- Returns:
- the number of identifiers that satisfy the supplied predicate
-
getDescendants
Description copied from class:TestPlan
Get all descendants of the suppliedTestIdentifier
(i.e., all of its children and their children, recursively).- Overrides:
getDescendants
in classTestPlan
- Parameters:
parent
- the identifier to look up the descendants for; nevernull
- Returns:
- an unmodifiable set of the parent's descendants, potentially empty
-
containsTests
public boolean containsTests()Description copied from class:TestPlan
Return whether this test plan contains any tests.A test plan contains tests, if at least one of the contained engine descriptors contains tests.
- Overrides:
containsTests
in classTestPlan
- Returns:
true
if this test plan contains tests- See Also:
-