예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <summary>
        /// Adds another given step
        /// </summary>
        /// <param name="givenStep">The given step</param>
        public IGivenDefinition And(GivenHandler givenStep)
        {
            Given(givenStep);

            return this;
        }
예제 #3
0
        private void Given(GivenHandler givenStep)
        {
            givenStep.NotNull(nameof(givenStep));

            _givenSteps.Add(new GivenStep(givenStep));
        }
예제 #4
0
            public GivenStep(GivenHandler executor)
            {
                executor.NotNull(nameof(executor));

                _executor = executor;
            }
예제 #5
0
        /// <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;
        }