@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 |
---|---|
Optional<Object> |
getOuterInstance()
Get the instance of the outer class, if available.
|
Class<?> |
getTestClass()
Get the test class for this context.
|
Class<?> getTestClass()
null
Optional<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
Copyright © 2020. All rights reserved.