Add test for AND_GIVEN and update the baselines

This commit is contained in:
Martin Hořeňovský 2018-09-02 15:38:33 +02:00
parent 64fd5b8058
commit efbf50fc7d
4 changed files with 58 additions and 50 deletions

View file

@ -38,11 +38,14 @@ namespace { namespace BDDTests {
SCENARIO("Do that thing with the thing", "[Tags]") {
GIVEN("This stuff exists") {
// make stuff exist
WHEN("I do this") {
// do this
THEN("it should do this") {
REQUIRE(itDoesThis());
AND_THEN("do that")REQUIRE(itDoesThat());
AND_GIVEN("And some assumption") {
// Validate assumption
WHEN("I do this") {
// do this
THEN("it should do this") {
REQUIRE(itDoesThis());
AND_THEN("do that")REQUIRE(itDoesThat());
}
}
}
}