DateTimeAssertions class

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

Inheritance

Constructors

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

Properties

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

Methods

as(String subjectLabel) DateTimeAssertions
Set friendly title for the subject
inherited
be(DateTime expected) DateTimeAssertions
Asserts that the value is equal to the specified expected value. expected The expected value
inherited
beAfter(DateTime expected) DateTimeAssertions
Asserts that the current DateTime is after the specified value.
beAssignableTo<U>() → U?
Asserts that the object is assignable to a variable of type U
inherited
beBefore(DateTime expected) DateTimeAssertions
Asserts that the current DateTime is before the specified value.
beCloseTo(DateTime nearbyValue, {required Duration delta}) DateTimeAssertions
Asserts that the current DateTime is within the specified Duration
beNull() DateTimeAssertions
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<DateTime> validItems) DateTimeAssertions
Asserts that a value is one of the specified validItems
inherited
copy(DateTime? subject, {bool isReversed = false, String? subjectLabel}) DateTimeAssertions
Copy the matcher
override
isEqual(DateTime 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