The ScenarioGroup including the result of each action
Examples: How use the rub function on a feature
import std.algorithm.comparison : equal; import std.algorithm.iteration : map; import std.array; import tagion.behaviour.BehaviourUnittest; auto awesome = new Some_awesome_feature; const runner_result = run(awesome); auto expected = only( "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.is_valid", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.in_credit", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.contains_cash", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.request_cash", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.is_debited", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.is_dispensed", "tagion.behaviour.BehaviourUnittest.Some_awesome_feature.swollow_the_card", ) .map!(a => result(a)); assert(awesome.count == 7); Document[] results; results ~= runner_result.given.infos .map!(info => info.result) .array; results ~= runner_result.when.infos .map!(info => info.result) .array; results ~= runner_result.then.infos .map!(info => info.result) .array; results ~= runner_result.but.infos .map!(info => info.result) .array; assert(equal(results, expected));
Runs the scenario in Given, When, Then, But order