コード例 #1
0
 public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
 {
     var line = currentScenario.KeywordLine;
     if (examplesRow != null && examplesRow.BlockRelativeLine >= 0)
         line += examplesRow.BlockRelativeLine;
     return RunInCurrentContext(VsxHelper.GetFileName(projectItem), debug, line);
 }
コード例 #2
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            var testRunnerGateway = GetCurrentTestRunnerGateway(projectItem.ContainingProject);
            if (testRunnerGateway == null)
                return false;

            return testRunnerGateway.RunScenario(projectItem, currentScenario, examplesRow, fileScope, debug);
        }
コード例 #3
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            if (fileScope.HeaderBlock == null)
                return false;

            //TODO: support scenario outline
            string path = string.Format("Feature:{0}/Scenario:{1}", Escape(fileScope.HeaderBlock.Title), Escape(currentScenario.Title));
            return RunTests(projectItem.ContainingProject, "testpath:" + path, debug);
        }
コード例 #4
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            var line = currentScenario.KeywordLine;

            if (examplesRow != null && examplesRow.BlockRelativeLine >= 0)
            {
                line += examplesRow.BlockRelativeLine;
            }
            return(RunInCurrentContext(VsxHelper.GetFileName(projectItem), debug, line));
        }
コード例 #5
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            var testRunnerGateway = GetCurrentTestRunnerGateway(projectItem.ContainingProject);

            if (testRunnerGateway == null)
            {
                return(false);
            }

            return(testRunnerGateway.RunScenario(projectItem, currentScenario, examplesRow, fileScope, debug));
        }
コード例 #6
0
 public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
 {
     int sourceLine = currentScenario.KeywordLine + 1; // keywordline is zero-indexed
     return RunFromCodeBehind(projectItem, codeBehindTextDocument => GetCodeBehindLine(codeBehindTextDocument, sourceLine, currentScenario), debug);
 }
コード例 #7
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            int sourceLine = currentScenario.KeywordLine + 1; // keywordline is zero-indexed

            return(RunFromCodeBehind(projectItem, codeBehindTextDocument => GetCodeBehindLine(codeBehindTextDocument, sourceLine, currentScenario), debug));
        }
コード例 #8
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            if (fileScope.HeaderBlock == null)
            {
                return(false);
            }

            string escapedFeatureTitle = Escape(fileScope.HeaderBlock.Title);
            string scenarioPattern     = currentScenario is IScenarioOutlineBlock
                                   ? string.Format("{0}, *", currentScenario.Title)
                                   : currentScenario.Title;

            string path = string.Format("Feature:{0}/Scenario:{1}", escapedFeatureTitle, Escape(scenarioPattern));

            return(RunTests(projectItem.ContainingProject, string.Format("testpath:{0}", path), debug));
        }
コード例 #9
0
        public bool RunScenario(ProjectItem projectItem, IScenarioBlock currentScenario, ScenarioOutlineExamplesRow examplesRow, IGherkinFileScope fileScope, bool debug)
        {
            if (fileScope.HeaderBlock == null)
            {
                return(false);
            }

            //TODO: support scenario outline
            string path = string.Format("Feature:{0}/Scenario:{1}", Escape(fileScope.HeaderBlock.Title), Escape(currentScenario.Title));

            return(RunTests(projectItem.ContainingProject, "testpath:" + path, debug));
        }