We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f97af06 commit 0d70a26Copy full SHA for 0d70a26
test/src/numeric/between_validator_test.dart
@@ -7,6 +7,23 @@ void main() {
7
final String customErrorMessage = faker.lorem.sentence();
8
9
group('BetweenValidator -', () {
10
+ group('bool', () {
11
+ test('should return errorText when type is invalid', () {
12
+ // Arrange
13
+ const num min = 5;
14
+ const num max = 10;
15
+ final BetweenValidator<bool> validator =
16
+ BetweenValidator<bool>(min, max, errorText: customErrorMessage);
17
+ const bool value = true;
18
+
19
+ // Act
20
+ final String? result = validator.validate(value);
21
22
+ // Assert
23
+ expect(result, equals(customErrorMessage));
24
+ });
25
26
27
group('num', () {
28
test('should return null if the value is exactly at the minimum boundary',
29
() {
0 commit comments