BooleanTestCase<INPUT extends Object?> class
A TestCase class that can be used to compare boolean values. It uses the equals matcher.
Example:
void main() {
BooleanTestCase.truthy(
when: 'When upper case text is provided',
input: 'HELLO',
action: (String input) => input.isUpperCase(),
).execute();
}
- Inheritance
-
- Object
- TestCase<
INPUT, bool> - ValueTestCase<
INPUT, bool> - BooleanTestCase
Constructors
-
BooleanTestCase.falsy({required String when, String then = 'should return false.', required INPUT input, ParameterizedCallback<
INPUT, bool> ? action, String? testOn, Timeout? timeout, dynamic skip, dynamic tags, Map<String, dynamic> ? onPlatform, int? retry}) -
action
is optional. Do not provideaction
if the TestCase is executed in a TestGroup. -
BooleanTestCase.truthy({required String when, String then = 'should return true.', required INPUT input, ParameterizedCallback<
INPUT, bool> ? action, String? testOn, Timeout? timeout, dynamic skip, dynamic tags, Map<String, dynamic> ? onPlatform, int? retry}) -
action
is optional. Do not provideaction
if the TestCase is executed in a TestGroup.
Properties
-
action
→ ParameterizedCallback<
INPUT, bool> ? -
Provided only if the TestCase is executed without a TestGroup.
If TestGroup is provided, the common action is run by just varying the input.
finalinherited
- description → String
-
You can extend this class and override this field.
no setterinherited
- descriptionDelimiter → String
-
descriptionDelimiter is defaulted to this class.
You can extend this class and override this field.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- input → INPUT
-
Input value for the test case. The type is provided as a generic.
finalinherited
- matcher → dynamic
-
Custom output matcher for the test case.
Sent as such to the test function.
finalinherited
-
onPlatform
→ Map<
String, dynamic> ? -
Direct forward to test function
finalinherited
- output → bool
-
A simple output value can be provided instead of a custom matcher.
Generated matcher will be 'equals(output)'
finalinherited
- retry → int?
-
Direct forward to test function
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skip → dynamic
-
Direct forward to test function
finalinherited
-
Direct forward to test function
finalinherited
- testOn → String?
-
Direct forward to test function
finalinherited
- then → String
-
'then' part of the description.
finalinherited
- timeout → Timeout?
-
Direct forward to test function
finalinherited
- when → String
-
'when' part of the description.
finalinherited
Methods
-
copyWith(
ParameterizedCallback< INPUT, bool> action) → ValueTestCase<INPUT, bool> -
copyWith is used internally by the TestGroup.
inherited
-
execute(
) → void -
Wrapper to the test function.
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