given_when_then library

Classes

UnitTestGiven<T>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_unit_test_support.dart for a complete example
UnitTestThen<T>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_unit_test_support.dart for a complete example
UnitTestWhen<T>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_unit_test_support.dart for a complete example
WidgetTestGiven<T extends WidgetTestHarness>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_widget_test_support.dart for a complete example
WidgetTestHarness
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_widget_test_support.dart for a complete example
WidgetTestThen<T extends WidgetTestHarness>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_widget_test_support.dart for a complete example
WidgetTestWhen<T extends WidgetTestHarness>
You can use this class directly and then author your own extensions to it for your specific behaviors or you can extend this class and provide any dependencies you require. See example_widget_test_support.dart for a complete example

Functions

givenWhenThenUnitTest<T>(T harness, UnitTestHarnessCallback<T> callback) Future<void>
This function is intended to wrap your Unit tests so that you can access the UnitTestGiven, UnitTestWhen, and UnitTestWhen to compose the test case. You will want to create some of your own test support code that is specific to your code under test. It should look something like this:
givenWhenThenWidgetTest<T extends WidgetTestHarness>(T harness, WidgetTestHarnessCallback<T> callback) Future<void>
This function is intended to wrap your Widget tests so that you can access the WidgetTestGiven, WidgetTestWhen, and WidgetTestWhen to compose the test case. You will want to create some of your own test support code that is specific to your code under test. It should look something like this:

Typedefs

UnitTestHarnessCallback<T> = Future<void> Function(UnitTestGiven<T>, UnitTestWhen<T>, UnitTestThen<T>)
This function is intended to wrap your Unit tests so that you can access the UnitTestGiven, UnitTestWhen, and UnitTestWhen to compose the test case. You will want to create some of your own test support code that is specific to your code under test. It should look something like this
WidgetTestHarnessCallback<T extends WidgetTestHarness> = Future<void> Function(WidgetTestGiven<T>, WidgetTestWhen<T>, WidgetTestThen<T>)
This function is intended to wrap your Widget tests so that you can access the WidgetTestGiven, WidgetTestWhen, and WidgetTestWhen to compose the test case. You will want to create some of your own test support code that is specific to your code under test. It should look something like this: