Class VintageTestEngine
- java.lang.Object
-
- org.junit.vintage.engine.VintageTestEngine
-
- All Implemented Interfaces:
TestEngine
@API(status=INTERNAL, since="4.12") public final class VintageTestEngine extends Object implements TestEngine
The JUnit VintageTestEngine
.- Since:
- 4.12
-
-
Constructor Summary
Constructors Constructor Description VintageTestEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestDescriptor
discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId)
Discover tests according to the suppliedEngineDiscoveryRequest
.void
execute(ExecutionRequest request)
Execute tests according to the suppliedExecutionRequest
.Optional<String>
getArtifactId()
Returnsjunit-vintage-engine
as the artifact ID.Optional<String>
getGroupId()
Returnsorg.junit.vintage
as the group ID.String
getId()
Get the ID that uniquely identifies this test engine.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.TestEngine
getVersion
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:TestEngine
Get the ID that uniquely identifies this test engine.Each test engine must provide a unique ID. For example, JUnit Vintage and JUnit Jupiter use
"junit-vintage"
and"junit-jupiter"
, respectively. When in doubt, you may use the fully qualified name of your customTestEngine
implementation class.- Specified by:
getId
in interfaceTestEngine
-
getGroupId
public Optional<String> getGroupId()
Returnsorg.junit.vintage
as the group ID.- Specified by:
getGroupId
in interfaceTestEngine
- Returns:
- an
Optional
containing the group ID; nevernull
but potentially empty if the group ID is unknown - See Also:
TestEngine.getArtifactId()
,TestEngine.getVersion()
-
getArtifactId
public Optional<String> getArtifactId()
Returnsjunit-vintage-engine
as the artifact ID.- Specified by:
getArtifactId
in interfaceTestEngine
- Returns:
- an
Optional
containing the artifact ID; nevernull
but potentially empty if the artifact ID is unknown - See Also:
Class.getPackage()
,Package.getImplementationTitle()
,TestEngine.getGroupId()
,TestEngine.getVersion()
-
discover
public TestDescriptor discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId)
Description copied from interface:TestEngine
Discover tests according to the suppliedEngineDiscoveryRequest
.The supplied
UniqueId
must be used as the unique ID of the returned rootTestDescriptor
. In addition, theUniqueId
must be used to create unique IDs for children of the root's descriptor by callingUniqueId.append(java.lang.String, java.lang.String)
.- Specified by:
discover
in interfaceTestEngine
- Parameters:
discoveryRequest
- the discovery request; nevernull
uniqueId
- the unique ID to be used for this test engine'sTestDescriptor
; nevernull
- Returns:
- the root
TestDescriptor
of this engine, typically an instance ofEngineDescriptor
- See Also:
EngineDescriptor
-
execute
public void execute(ExecutionRequest request)
Description copied from interface:TestEngine
Execute tests according to the suppliedExecutionRequest
.The
request
passed to this method contains the rootTestDescriptor
that was previously returned byTestEngine.discover(org.junit.platform.engine.EngineDiscoveryRequest, org.junit.platform.engine.UniqueId)
, theEngineExecutionListener
to be notified of test execution events, andConfigurationParameters
that may influence test execution.- Specified by:
execute
in interfaceTestEngine
- Parameters:
request
- the request to execute tests for; nevernull
-
-