コード例 #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
ファイル: GivenWhenThen.cs プロジェクト: c4rm4x/C4rm4x.Tools
        /// <summary>
        /// Adds another given step
        /// </summary>
        /// <param name="givenStep">The given step</param>
        public IGivenDefinition And(GivenHandler givenStep)
        {
            Given(givenStep);

            return this;
        }
コード例 #3
0
ファイル: GivenWhenThen.cs プロジェクト: c4rm4x/C4rm4x.Tools
        private void Given(GivenHandler givenStep)
        {
            givenStep.NotNull(nameof(givenStep));

            _givenSteps.Add(new GivenStep(givenStep));
        }
コード例 #4
0
ファイル: GivenWhenThen.cs プロジェクト: c4rm4x/C4rm4x.Tools
            public GivenStep(GivenHandler executor)
            {
                executor.NotNull(nameof(executor));

                _executor = executor;
            }
コード例 #5
0
ファイル: GivenWhenThen.cs プロジェクト: c4rm4x/C4rm4x.Tools
        /// <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;
        }