Module org.junit.jupiter.api
Package org.junit.jupiter.api.extension
Interface TestInstanceFactoryContext
TestInstanceFactoryContext
encapsulates the context in which
a test class is to be instantiated by a
TestInstanceFactory
.- Since:
- 5.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet the instance of the outer class, if available.Class
<?> Get the test class for this context.
-
Method Details
-
getTestClass
Class<?> getTestClass()Get the test class for this context.- Returns:
- the test class to be instantiated; never
null
-
getOuterInstance
Get the instance of the outer class, if available.The returned
Optional
will be empty unless the current test class is a@Nested
test class.- Returns:
- an
Optional
containing the outer test instance; nevernull
but potentially empty - See Also:
-