parameterizedTest top-level property
- @isTestGroup
Create a new parameterizedTest with given description
, values
and body
parameterizedTest also have the same options as group tests have. These options will be passed to the group function.
For example:
parameterizedTest(
'Amount of letters',
[
['kiwi', 4],
['apple', 5],
['banana', 6].options(skip: 'skip this'),
],
(String word, int length) {
expect(word.length, length);
},
);
Implementation
// ignore: comment_references
/// Create a new parameterizedTest with given [description], [values] and [body]
///
/// [parameterizedTest] also have the same options as group tests have.
/// These options will be passed to the group function.
///
/// For example:
/// ```dart
/// parameterizedTest(
/// 'Amount of letters',
/// [
/// ['kiwi', 4],
/// ['apple', 5],
/// ['banana', 6].options(skip: 'skip this'),
/// ],
/// (String word, int length) {
/// expect(word.length, length);
/// },
/// );
/// ```
/// {@endtemplate}
@isTestGroup
ParameterizedTest get parameterizedTest => const ParameterizedTestImpl(
group,
test,
setUp,
tearDown,
);