Skip to content

Commit 26b03c8

Browse files
committed
✅ Added test with complex object in description
1 parent 848f4d2 commit 26b03c8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/parameterized_test_test.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void main() {
8282
'formatted output by customDescriptionBuilder ', () {
8383
final values = [1, 2, 3];
8484

85-
String builder(
85+
Object? builder(
8686
Object? groupDescription,
8787
int index,
8888
List<dynamic> values,
@@ -94,6 +94,25 @@ void main() {
9494

9595
expect(result, '[ Group description | 1 | 3 ]');
9696
});
97+
98+
test(
99+
'makeDescription return a String with '
100+
'formatted output by customDescriptionBuilder '
101+
'and complex object as group description', () {
102+
final values = [1, 2, 3];
103+
104+
Object? builder(
105+
Object? groupDescription,
106+
int index,
107+
List<dynamic> values,
108+
) {
109+
return '[ $groupDescription | $index | ${values.length} ]';
110+
}
111+
112+
final result = pTest.makeDescription(DateTime(2024,04,17), 1, values, builder);
113+
114+
expect(result, '[ 2024-04-17 00:00:00.000 | 1 | 3 ]');
115+
});
97116
});
98117

99118
test('parseValues test', () {

0 commit comments

Comments
 (0)