コード例 #1
0
        /// <summary>
        /// Creates a BDD-style node with description using name of the Gherkin model such as:
        ///
        /// <list type="bullet">
        /// <item><see cref="Feature"/></item>
        /// <item><see cref="Background"/></item>
        /// <item><see cref="Scenario"/></item>
        /// <item><see cref="Given"/></item>
        /// <item><see cref="When"/></item>
        /// <item><see cref="Then"/></item>
        /// <item><see cref="And"/></item>
        /// </list>
        ///
        /// <code>
        /// test.CreateNode(new GherkinKeyword("Feature"), "Name", "Description");
        /// </code>
        /// </summary>
        /// <param name="gherkinKeyword">Name of the <see cref="GherkinKeyword"/></param>
        /// <param name="name">Node name</param>
        /// <param name="description">A short description</param>
        /// <returns>A <see cref="ExtentTest"/> object</returns>
        public ExtentTest CreateNode(GherkinKeyword gherkinKeyword, string name, string description = null)
        {
            var node = createNode(name, description);

            node.GetModel().BehaviorDrivenType = gherkinKeyword.GetModel();
            return(node);
        }
コード例 #2
0
        public ExtentTest CreateTest(GherkinKeyword gherkinKeyword, string name, string description = null)
        {
            var extentTest = CreateTest(name, description);

            extentTest.GetModel().BehaviorDrivenType = gherkinKeyword.GetModel();
            return(extentTest);
        }