simple_gwt 0.0.4 copy "simple_gwt: ^0.0.4" to clipboard
simple_gwt: ^0.0.4 copied to clipboard

outdated

Given When Then style test package.

Simple Given When Then #

The simple_gwt package is to write tests in the 'Given When Then' style.

Features #

  • Given When Then style test functions

Getting started #

Add the simple_gwh package to dev_dependencies in pubspec.yaml.

Usage #

void main() {
  String? a;
  String? b;

  aIsNull() => a = null;
  bIsNull() => b = null;

  test('Test1', gwt(() {
    given(aIsNull);
    and(bIsNull);

    when(() => a = 'a', 'set a');
    and(() => b = 'b', 'set b');

    then(() => expect(a, 'a'), 'a is a');
    and(() => expect(b, 'b'), 'b is b');
  }));
}
1
likes
0
pub points
7%
popularity

Publisher

verified publishercaph.jp

Given When Then style test package.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, test

More

Packages that depend on simple_gwt