Expect<ExpectedType> class

Expects are used in Test.assertions to check if an assertion is true or false.

Will return AssertResult depending if assertion passes, fails, or is inconclusive.

Implementers

Constructors

Expect({required ExpectedType? actual, required ExpectedType? expected})
Do not use in tests. This is exposed for extensibility.
Expect.equals({required ExpectedType? actual, required ExpectedType? expected})
Checks if actual == expected
factory
Expect.isEqual({required ExpectedType? actual, required ExpectedType? expected})
Checks if actual == expected
factory
Expect.isFalse(ExpectedType? actual)
Checks if actual is false
factory
Expect.isNotEqual({required ExpectedType? actual, required ExpectedType? notExpected})
Checks if actual != expected
factory
Expect.isNotNull(ExpectedType? actual)
Checks if actual is not null
factory
Expect.isNull(ExpectedType? actual)
Checks if actual is null
factory
Expect.isTrue(ExpectedType? actual)
Checks if actual is true
factory
Expect.isType(dynamic actual)
Checks if actual is of type
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run() AssertResult
toString() String
A string representation of this object.
inherited

Operators

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