simple_gwt 0.0.13 icon indicating copy to clipboard operation
simple_gwt: ^0.0.13 copied to clipboard

SimpleGWT package provides 'Given When Then' style test functions.

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('set a', () => a = 'a');
    and('set b', () => b = 'b');
    then('a is a', () => expect(a, 'a'));
    and('b is b', () => expect(b, 'b'));
    thenExpect('a is a', a, 'a')
  }));
}
1
likes
130
pub points
16%
popularity

Publisher

verified publisher iconcaph.jp

SimpleGWT package provides 'Given When Then' style test functions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, test

More

Packages that depend on simple_gwt