ObjectAssertions class
Contains a number of methods to assert that a Object is in the expected state.
- Inheritance
-
- Object
- BaseAssertions<
Object, ObjectAssertions> - ObjectAssertions
Constructors
- ObjectAssertions(Object? subject, {bool isReversed = false, String? subjectLabel})
-
Initializes a new instance of the
ObjectAssertionsclass.
Properties
- and → ObjectAssertions
-
Bind assertions
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReversed → bool
-
Checking reverse
finalinherited
- not → ObjectAssertions
-
Invert assertion
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subject → Object?
-
the object which value is being asserted.
finalinherited
- subjectLabel → String
-
Friendly label for the subject object
no setterinherited
Methods
-
as(
String subjectLabel) → ObjectAssertions -
Set friendly title for the subject
inherited
-
be(
Object expected) → ObjectAssertions -
Asserts that the value is equal to the specified
expectedvalue.expectedThe expected valueinherited -
beAssignableTo<
U> () → U? -
Asserts that the object is assignable to a variable of type
Uinherited -
beNull(
) → ObjectAssertions -
Asserts that the object is not
nullinherited -
beOfType<
U> () → U? -
Asserts that the object is not of the specified type
Uinherited -
beOneOf(
Iterable< Object> validItems) → ObjectAssertions -
Asserts that a value is one of the specified
validItemsinherited -
copy(
Object? subject, {bool isReversed = false, String? subjectLabel}) → ObjectAssertions -
Copy the matcher
override
-
isEqual(
Object expected) → bool -
Comparison with an another
expectedvalueinherited -
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