@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 and Description |
|---|---|
java.util.Optional<java.lang.Object> |
getOuterInstance()
Get the instance of the outer class, if available.
|
java.lang.Class<?> |
getTestClass()
Get the test class for this context.
|
java.lang.Class<?> getTestClass()
nulljava.util.Optional<java.lang.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 emptyNested