testify 0.0.3 copy "testify: ^0.0.3" to clipboard
testify: ^0.0.3 copied to clipboard

scalable Flutter testing framework enforcing tests via well defined test cases

example/main.dart

import 'package:flutter_test/flutter_test.dart';

import 'package:testify/testify.dart';

void main() {
  List<TestCase<Counter>> testCaseList = [
    TestCase<Counter>(
      description: 'properly increments the counter',
      assembler: () => Counter(),
      actors: [
        (counter) {
          counter.increment();
          return counter;
        },
      ],
      matchers: [
        (counter) {
          expect(counter.count, equals(1));
        }
      ],
    ),
  ];

  TestCaseExecutor<Counter> testCaseExecutor = TestCaseExecutor(testCaseList);
  testCaseExecutor.run();
}

class Counter {
  int count = 0;

  void increment() {
    count++;
  }

  void decrement() {
    count--;
  }
}
3
likes
130
pub points
0%
popularity

Publisher

verified publisherquantumgray.tech

scalable Flutter testing framework enforcing tests via well defined test cases

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (LICENSE)

Dependencies

flutter_test

More

Packages that depend on testify