event_db_tester 0.2.0 copy "event_db_tester: ^0.2.0" to clipboard
event_db_tester: ^0.2.0 copied to clipboard

Provides a testing utility for event_db. Mainly through genericModelTest

Event Bloc Tester #

Features #

This package provides a utilty method genericModelTest

Usage #

Please see the test case and example for example use cases.

void main() {
  group('Models', () {
    group('copy', () {
      genericModelTest(models: modelTestCases);
    });
  });
}

final modelTestCases = {
  'Example': () => Tuple2(
        ExampleModel()
          ..first = 'First'
          ..second = 'Second',
        ExampleModel.new,
      ),
  'Fail': () => Tuple2(
        FailModel()
          ..first = 'Fail'
          ..second = 'Terrible',
        FailModel.new,
      )
};

Simply create a map with the test name being the key and the value containing the model you want to test.

Additional information #

You can see this package in use in the following projects:

0
likes
50
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Provides a testing utility for event_db. Mainly through genericModelTest

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

event_bloc_tester, event_db, test, tuple

More

Packages that depend on event_db_tester