constructorTester<T> function

void constructorTester<T>(
  1. Nullary<T> tester
)

ensure coverage of a class contructor

Implementation

//**
//eg:
//```dart
//class Foo {
//   const Foo();
// }
// void main() => constructorTester(Foo.new);
// ```
// */
void constructorTester<T>(Nullary<T> tester) => test(
      'GIVEN Nullary<$T> tester'
      'WHEN tester() '
      'THEN should be of type $T',
      () => expect(
        tester(),
        isA<T>(),
        reason: 'type should match',
      ),
    );