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

            return this;
        }
Ejemplo n.º 3
0
        private void Given(GivenHandler givenStep)
        {
            givenStep.NotNull(nameof(givenStep));

            _givenSteps.Add(new GivenStep(givenStep));
        }
Ejemplo n.º 4
0
            public GivenStep(GivenHandler executor)
            {
                executor.NotNull(nameof(executor));

                _executor = executor;
            }
Ejemplo n.º 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;
        }