/// <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);
        }
        public ExtentTest CreateTest(GherkinKeyword gherkinKeyword, string name, string description = null)
        {
            var extentTest = CreateTest(name, description);

            extentTest.GetModel().BehaviorDrivenType = gherkinKeyword.GetModel();
            return(extentTest);
        }
示例#3
0
        public ExtentTest CreateNode(GherkinKeyword keyword, string name, string description = "")
        {
            var node = new ExtentTest(Extent, name, description);

            node.Model.BehaviorDrivenType = keyword.Model;
            ApplyCommonNodeSettings(node);
            return(node);
        }
示例#4
0
        public ExtentTest CreateTest(GherkinKeyword keyword, string name, string description = "")
        {
            var test = new ExtentTest(this, name, description);

            test.Model.BehaviorDrivenType = keyword.Model;
            base.SaveTest(test.Model);
            return(test);
        }