@API(status=EXPERIMENTAL,
since="5.3")
public interface TestInstanceFactoryContext
TestInstanceFactoryContext encapsulates the context in which
a test class is to be instantiated by a
TestInstanceFactory.TestInstanceFactory| Modifier and Type | Method | Description |
|---|---|---|
Optional<Object> |
getOuterInstance() |
Get the instance of the outer class, if available.
|
Class<?> |
getTestClass() |
Get the test class for this context.
|
Class<?> getTestClass()
nullOptional<Object> getOuterInstance()
The returned Optional will be empty unless the
current test class is a
@Nested test class.
Optional containing the outer test instance; never
null but potentially emptyNestedCopyright © 2019. All rights reserved.