Package org.junit.jupiter.engine.script
Class Script
- java.lang.Object
-
- org.junit.jupiter.engine.script.Script
-
@API(status=INTERNAL, since="5.1") public final class Script extends java.lang.Object
Script data class.- Since:
- 5.1
- See Also:
DisabledIf
,EnabledIf
,ScriptExecutionManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BIND_JUNIT_CONFIGURATION_PARAMETER
Accessor for JUnit Platform configuration parameters.static java.lang.String
BIND_JUNIT_DISPLAY_NAME
Display name of the test or container.static java.lang.String
BIND_JUNIT_TAGS
Set of all tags assigned to the current extension context.static java.lang.String
BIND_JUNIT_UNIQUE_ID
Unique ID associated with the current extension context.static java.lang.String
DEFAULT_SCRIPT_ENGINE_NAME
The script engine name defaults toNashorn
.static java.lang.String
DEFAULT_SCRIPT_REASON_PATTERN
Default reason message pattern.
-
Constructor Summary
Constructors Constructor Description Script(java.lang.annotation.Annotation annotation, java.lang.String engine, java.lang.String source, java.lang.String reason)
Script(java.lang.reflect.Type annotationType, java.lang.String annotationAsString, java.lang.String engine, java.lang.String source, java.lang.String reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getAnnotationAsString()
java.lang.reflect.Type
getAnnotationType()
java.lang.String
getEngine()
java.lang.String
getReason()
java.lang.String
getSource()
int
hashCode()
java.lang.String
toReasonString(java.lang.String resultAsString)
-
-
-
Field Detail
-
DEFAULT_SCRIPT_ENGINE_NAME
public static final java.lang.String DEFAULT_SCRIPT_ENGINE_NAME
The script engine name defaults toNashorn
.- See Also:
- Constant Field Values
-
BIND_JUNIT_TAGS
public static final java.lang.String BIND_JUNIT_TAGS
Set of all tags assigned to the current extension context.Value type:
Set<String>
- See Also:
ExtensionContext.getTags()
, Constant Field Values
-
BIND_JUNIT_UNIQUE_ID
public static final java.lang.String BIND_JUNIT_UNIQUE_ID
Unique ID associated with the current extension context.Value type:
String
-
BIND_JUNIT_DISPLAY_NAME
public static final java.lang.String BIND_JUNIT_DISPLAY_NAME
Display name of the test or container.Value type:
String
-
BIND_JUNIT_CONFIGURATION_PARAMETER
public static final java.lang.String BIND_JUNIT_CONFIGURATION_PARAMETER
Accessor for JUnit Platform configuration parameters.Usage:
junitConfigurationParameter.get(key) -> String
-
DEFAULT_SCRIPT_REASON_PATTERN
public static final java.lang.String DEFAULT_SCRIPT_REASON_PATTERN
Default reason message pattern.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Script
public Script(java.lang.annotation.Annotation annotation, java.lang.String engine, java.lang.String source, java.lang.String reason)
-
Script
public Script(java.lang.reflect.Type annotationType, java.lang.String annotationAsString, java.lang.String engine, java.lang.String source, java.lang.String reason)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getAnnotationAsString
public java.lang.String getAnnotationAsString()
-
getAnnotationType
public java.lang.reflect.Type getAnnotationType()
-
getEngine
public java.lang.String getEngine()
-
getReason
public java.lang.String getReason()
-
getSource
public java.lang.String getSource()
-
toReasonString
public java.lang.String toReasonString(java.lang.String resultAsString)
- Returns:
- the string returned by
getReason()
with all placeholders replaced with their current values stored here.
-
-