| addToParent | back to summary
|
|---|
| public <T extends TestDescriptor> Optional<T> addToParent(Function<TestDescriptor, Optional<T>> creator) Implements org.junit.platform.engine.support.discovery.SelectorResolver.Context.addToParent.
Doc from org.junit.platform.engine.support.discovery.SelectorResolver.Context.addToParent.
Add a TestDescriptor to an unspecified parent, usually the
engine descriptor, by applying the supplied Function to the
new parent.
The parent will be the engine descriptor unless another parent has
already been determined, i.e. if the selector that is being resolved
is the result of expanding a Match.
If the result of applying the Function is present, it will be added as a child of the
parent TestDescriptor unless a descriptor with the same
unique ID was added
earlier.
- Annotations
- @Override
|
| addToParent | back to summary
|
|---|
| public <T extends TestDescriptor> Optional<T> addToParent(Supplier<DiscoverySelector> parentSelectorSupplier, Function<TestDescriptor, Optional<T>> creator) Implements org.junit.platform.engine.support.discovery.SelectorResolver.Context.addToParent.
Doc from org.junit.platform.engine.support.discovery.SelectorResolver.Context.addToParent.
Add a TestDescriptor to a parent, specified by the DiscoverySelector returned by the supplied Supplier, by
applying the supplied Function to the new parent.
Unless another parent has already been determined, i.e. if the
selector that is being resolved is the result of expanding a Match, the DiscoverySelector returned by the supplied Supplier will
be used to determine the parent. If no parent is found, the supplied
Function will not be called. If there are multiple potential
parents, an exception will be thrown. Otherwise, the resolved
TestDescriptor will be used as the parent and passed to the
supplied Function.
If the result of applying the Function is present, it will be added as a child of the
parent TestDescriptor unless a descriptor with the same
unique ID was added
earlier.
- Annotations
- @Override
|