@API(value=Experimental)
public final class TestIdentifier
extends java.lang.Object
implements java.io.Serializable
TestPlan.TestPlan,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static TestIdentifier |
from(org.junit.gen5.engine.TestDescriptor testDescriptor) |
java.lang.String |
getDisplayName()
Get the display name for the represented test or container.
|
java.lang.String |
getName()
Get the name for the represented test or container.
|
java.util.Optional<TestId> |
getParentId()
Get the unique ID of this identifier's parent, if available.
|
java.util.Optional<org.junit.gen5.engine.TestSource> |
getSource()
Get the source location of the represented test
or container, if available.
|
java.util.Set<org.junit.gen5.engine.TestTag> |
getTags()
Get the set of tags of the represented test or
container.
|
TestId |
getUniqueId()
Get the unique ID of the represented test or container.
|
int |
hashCode() |
boolean |
isContainer()
Returns
true if this identifier represents a container. |
boolean |
isTest()
Returns
true if this identifier represents a test. |
java.lang.String |
toString() |
public static TestIdentifier from(org.junit.gen5.engine.TestDescriptor testDescriptor)
public TestId getUniqueId()
Uniqueness must be guaranteed across an entire test plan, regardless of how many engines are used behind the scenes.
public java.lang.String getName()
The name is a technical name for a test or container. It must not be parsed or processed besides being displayed to end-users.
public java.lang.String getDisplayName()
The display name is a human-readable name for a test or container. It must not be parsed or processed besides being displayed to end-users.
public boolean isTest()
true if this identifier represents a test.public boolean isContainer()
true if this identifier represents a container.public java.util.Optional<org.junit.gen5.engine.TestSource> getSource()
TestSourcepublic java.util.Set<org.junit.gen5.engine.TestTag> getTags()
TestTagpublic java.util.Optional<TestId> getParentId()
An identifier without a parent ID is called a root.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object