EnumAssertions class

Contains a number of methods to assert that a Enum is in the expected state.

Inheritance

Constructors

EnumAssertions(Enum? subject, {bool isReversed = false, String? subjectLabel})
Initializes a new instance of the EnumAssertions class.

Properties

and EnumAssertions
Bind assertions
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isReversed bool
Checking reverse
finalinherited
not EnumAssertions
Invert assertion
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subject Enum?
the object which value is being asserted.
finalinherited
subjectLabel String
Friendly label for the subject object
no setterinherited

Methods

as(String subjectLabel) EnumAssertions
Set friendly title for the subject
inherited
be(Enum expected) EnumAssertions
Asserts that the value is equal to the specified expected value. expected The expected value
inherited
beAssignableTo<U>() → U?
Asserts that the object is assignable to a variable of type U
inherited
beNull() EnumAssertions
Asserts that the object is not null
inherited
beOfType<U>() → U?
Asserts that the object is not of the specified type U
inherited
beOneOf(Iterable<Enum> validItems) EnumAssertions
Asserts that a value is one of the specified validItems
inherited
copy(Enum? subject, {bool isReversed = false, String? subjectLabel}) EnumAssertions
Copy the matcher
override
isEqual(Enum expected) bool
Comparison with an another expected value
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited