/// <summary> /// Starts a new test plan with the initial given step /// </summary> /// <param name="step">The initial given step</param> protected IGivenDefinition Given(GivenHandler step) { _givenWhenThen = GivenWhenThen.StartWith(step); return(_givenWhenThen); }
/// <summary> /// Adds another given step /// </summary> /// <param name="givenStep">The given step</param> public IGivenDefinition And(GivenHandler givenStep) { Given(givenStep); return this; }
private void Given(GivenHandler givenStep) { givenStep.NotNull(nameof(givenStep)); _givenSteps.Add(new GivenStep(givenStep)); }
public GivenStep(GivenHandler executor) { executor.NotNull(nameof(executor)); _executor = executor; }
/// <summary> /// Creates a new instance of GivenWhenThen with the initial given step /// </summary> /// <param name="givenStep">The initial given step</param> /// <returns>A new instance of GivenWhenThen</returns> public static GivenWhenThen StartWith(GivenHandler givenStep) { var instance = new GivenWhenThen(); instance.Given(givenStep); return instance; }