@API(status=STABLE,
since="1.0")
public final class TestTag
extends java.lang.Object
implements java.io.Serializable
isValid(String),
create(String),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
RESERVED_CHARACTERS
Reserved characters that are not permissible as part of a tag name.
|
| Modifier and Type | Method and Description |
|---|---|
static TestTag |
create(java.lang.String name)
Create a
TestTag from the supplied name. |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName()
Get the name of this tag.
|
int |
hashCode() |
static boolean |
isValid(java.lang.String name)
Determine if the supplied tag name is valid with regard to the supported
syntax for tags.
|
java.lang.String |
toString() |
public static final java.util.Set<java.lang.String> RESERVED_CHARACTERS
",""("")""&""|""!"public static boolean isValid(java.lang.String name)
null.If this method returns true for a given name, it is then a
valid candidate for the create() factory
method.
name - the name of the tag to validate; may be null or blanktrue if the supplied tag name conforms to the supported
syntax for tagsStringUtils.isNotBlank(String),
String.trim(),
StringUtils.doesNotContainWhitespace(String),
StringUtils.doesNotContainIsoControlCharacter(String),
RESERVED_CHARACTERS,
create(String)public static TestTag create(java.lang.String name) throws org.junit.platform.commons.util.PreconditionViolationException
TestTag from the supplied name.
Consider checking whether the syntax of the supplied name
is valid before attempting to create a
TestTag using this factory method.
Note: the supplied name will be trimmed.
name - the name of the tag; must be syntactically validorg.junit.platform.commons.util.PreconditionViolationException - if the supplied tag name is not
syntactically validisValid(String)public java.lang.String getName()
null or blankpublic 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