NegativeTestCase<INPUT extends Object?, OUTPUT extends Object?> constructor

NegativeTestCase<INPUT extends Object?, OUTPUT extends Object?>({
  1. required String when,
  2. required INPUT input,
  3. required Type exception,
  4. ParameterizedCallback<INPUT, OUTPUT>? action,
  5. String? testOn,
  6. Timeout? timeout,
  7. dynamic skip,
  8. dynamic tags,
  9. Map<String, dynamic>? onPlatform,
  10. int? retry,
})

action is optional. Do not provide action if the TestCase is executed in a TestGroup. then is defaulted.

Implementation

NegativeTestCase({
  required String when,
  required INPUT input,
  required this.exception,
  ParameterizedCallback<INPUT, OUTPUT>? action,
  String? testOn,
  Timeout? timeout,
  dynamic skip,
  dynamic tags,
  Map<String, dynamic>? onPlatform,
  int? retry,
}) : super(
        when: when,
        then: 'fails with ${exception}',
        input: input,
        matcher: throwsA(ParameterizedTypeMatcher(exception)),
        action: action,
        testOn: testOn,
        timeout: timeout,
        skip: skip,
        tags: tags,
        onPlatform: onPlatform,
        retry: retry,
      );