Package hydra.testing
Class TestCaseWithMetadata
- java.lang.Object
-
- hydra.testing.TestCaseWithMetadata
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TestCaseWithMetadata>
public class TestCaseWithMetadata extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<TestCaseWithMetadata>
A test case together with metadata- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestCaseWithMetadata.BuilderA fluent builder forTestCaseWithMetadata.
-
Field Summary
Fields Modifier and Type Field Description static NameCASEName of thehydra.testing.TestCaseWithMetadata.casefield.TestCasecase_The test case itselfOptional<java.lang.String>descriptionAn optional longer description of the test casestatic NameDESCRIPTIONName of thehydra.testing.TestCaseWithMetadata.descriptionfield.java.lang.StringnameA short name for the test casestatic NameNAMEName of thehydra.testing.TestCaseWithMetadata.namefield.java.util.List<Tag>tagsZero or more tags for the test casestatic NameTAGSName of thehydra.testing.TestCaseWithMetadata.tagsfield.static NameTYPE_Name of thehydra.testing.TestCaseWithMetadatatype.
-
Constructor Summary
Constructors Constructor Description TestCaseWithMetadata(java.lang.String name, TestCase case_, Optional<java.lang.String> description, java.util.List<Tag> tags)Constructs an immutableTestCaseWithMetadata.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestCaseWithMetadata.Builderbuilder()Creates a new fluent builder forTestCaseWithMetadata.intcompareTo(TestCaseWithMetadata other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()TestCaseWithMetadatawithCase(TestCase case_)Returns a copy of thisTestCaseWithMetadatawithcasereplaced.TestCaseWithMetadatawithDescription(Optional<java.lang.String> description)Returns a copy of thisTestCaseWithMetadatawithdescriptionreplaced.TestCaseWithMetadatawithName(java.lang.String name)Returns a copy of thisTestCaseWithMetadatawithnamereplaced.TestCaseWithMetadatawithTags(java.util.List<Tag> tags)Returns a copy of thisTestCaseWithMetadatawithtagsreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.testing.TestCaseWithMetadatatype.
-
NAME
public static final Name NAME
Name of thehydra.testing.TestCaseWithMetadata.namefield.
-
CASE
public static final Name CASE
Name of thehydra.testing.TestCaseWithMetadata.casefield.
-
DESCRIPTION
public static final Name DESCRIPTION
Name of thehydra.testing.TestCaseWithMetadata.descriptionfield.
-
TAGS
public static final Name TAGS
Name of thehydra.testing.TestCaseWithMetadata.tagsfield.
-
name
public final java.lang.String name
A short name for the test case
-
case_
public final TestCase case_
The test case itself
-
description
public final Optional<java.lang.String> description
An optional longer description of the test case
-
tags
public final java.util.List<Tag> tags
Zero or more tags for the test case
-
-
Constructor Detail
-
TestCaseWithMetadata
public TestCaseWithMetadata(java.lang.String name, TestCase case_, Optional<java.lang.String> description, java.util.List<Tag> tags)Constructs an immutableTestCaseWithMetadata.- Parameters:
name- A short name for the test casecase_- The test case itselfdescription- An optional longer description of the test casetags- Zero or more tags for the test case
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(TestCaseWithMetadata other)
- Specified by:
compareToin interfacejava.lang.Comparable<TestCaseWithMetadata>
-
withName
public TestCaseWithMetadata withName(java.lang.String name)
Returns a copy of thisTestCaseWithMetadatawithnamereplaced.
-
withCase
public TestCaseWithMetadata withCase(TestCase case_)
Returns a copy of thisTestCaseWithMetadatawithcasereplaced.
-
withDescription
public TestCaseWithMetadata withDescription(Optional<java.lang.String> description)
Returns a copy of thisTestCaseWithMetadatawithdescriptionreplaced.
-
withTags
public TestCaseWithMetadata withTags(java.util.List<Tag> tags)
Returns a copy of thisTestCaseWithMetadatawithtagsreplaced.
-
builder
public static TestCaseWithMetadata.Builder builder()
Creates a new fluent builder forTestCaseWithMetadata.
-
-