Class DefaultTestInstanceFactoryContext
java.lang.Object
org.junit.jupiter.engine.descriptor.DefaultTestInstanceFactoryContext
- All Implemented Interfaces:
TestInstanceFactoryContext
Default implementation of the
TestInstanceFactoryContext
API.- Since:
- 5.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTestInstanceFactoryContext
(Class<?> testClass, Optional<Object> outerInstance) -
Method Summary
-
Field Details
-
testClass
-
outerInstance
-
-
Constructor Details
-
DefaultTestInstanceFactoryContext
-
-
Method Details
-
getTestClass
Description copied from interface:TestInstanceFactoryContext
Get the test class for this context.- Specified by:
getTestClass
in interfaceTestInstanceFactoryContext
- Returns:
- the test class to be instantiated; never
null
-
getOuterInstance
Description copied from interface:TestInstanceFactoryContext
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.- Specified by:
getOuterInstance
in interfaceTestInstanceFactoryContext
- Returns:
- an
Optional
containing the outer test instance; nevernull
but potentially empty - See Also:
-
toString
-