given_when_then_unit_test library

given_when_then_unit_test

Classes

GivenWhenThenOptions
Options for Given When Then
TestCase
TestCase1<A>
TestCase2<A, B>
TestCase3<A, B, C>
TestCase4<A, B, C, D>

Functions

after(dynamic callback()) → void
Registers a function to be run after tests.
afterAll(dynamic callback()) → void
Registers a function to be run once after all tests.
and(String description, dynamic body()) → void
before(dynamic callback()) → void
Registers a function to be run before tests.
beforeAll(dynamic callback()) → void
Registers a function to be run once before all tests.
but(String description, dynamic body(), {dynamic skip}) → void
given(String description, dynamic body(), {dynamic before()?, dynamic after()?, dynamic skip}) → void
Creates a group of tests.
testCases(List<TestCase> testCases, void verify(TestCase testCase)) → void
testCases1<A>(List<TestCase1<A>> testCases, void verify(TestCase1<A> testCase)) → void
testCases2<A, B>(List<TestCase2<A, B>> testCases, void verify(TestCase2<A, B> testCase)) → void
testCases3<A, B, C>(List<TestCase3<A, B, C>> testCases, void verify(TestCase3<A, B, C> testCase)) → void
testCases4<A, B, C, D>(List<TestCase4<A, B, C, D>> testCases, void verify(TestCase4<A, B, C, D> testCase)) → void
then(String description, dynamic body(), {Map<String, dynamic Function()> and = const {}, Map<String, dynamic Function()> but = const {}, dynamic skip}) → void
Creates a new test case with the given description (converted to a string) and body.
when(String description, dynamic body(), {dynamic before()?, dynamic after()?, dynamic skip}) → void
Creates a group of tests.
when2(String description, dynamic before()?, {required dynamic then(), dynamic after()?, bool skip = false}) → void
Alias for when; with slight alterations in the signature
whenn(String description, dynamic body(), {dynamic after()?, bool skip = false}) → void
Alias for when; with slight alterations in the signature