Enum Class ObjectTestContracts
- All Implemented Interfaces:
Serializable
,Comparable<ObjectTestContracts>
,Constable
Shorthand identifier / factory for the individual test contracts
- Author:
- Oliver Wolff
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTests the existence and correct implementation of theObject.equals(Object)
andObject.hashCode()
at the level of the concrete Object.Tests whether the object under test isSerializable
by first checking whether the object implementsSerializable
and than actually serializing and deserializing it.Tests the existence and correct implementation ofObject.toString()
at the level of the concrete Object. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<ObjectTestContracts>
Identifies the contract that are specific to Object contracts. -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectTestContracts
Returns the enum constant of this class with the specified name.static ObjectTestContracts[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUALS_AND_HASHCODE
Tests the existence and correct implementation of theObject.equals(Object)
andObject.hashCode()
at the level of the concrete Object. -
TO_STRING
Tests the existence and correct implementation ofObject.toString()
at the level of the concrete Object. -
SERIALIZABLE
Tests whether the object under test isSerializable
by first checking whether the object implementsSerializable
and than actually serializing and deserializing it.
-
-
Field Details
-
OBJECT_CONTRACTS
Identifies the contract that are specific to Object contracts.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
newObjectTestInstance
- Returns:
- a new instance of a
ObjectTestContract
.
-