From f957f45d937bf72dd2b5874ea3f65bdb62f9f300 Mon Sep 17 00:00:00 2001 From: jbandi Date: Sat, 3 Jul 2010 17:55:37 +0200 Subject: [PATCH] Including tests for handling asterisks. --- Tests/ParserTests/ParserTests.csproj | 10 +++ .../TestFiles/asterisks.feature.cs | 77 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 Tests/ParserTests/TestFiles/asterisks.feature.cs diff --git a/Tests/ParserTests/ParserTests.csproj b/Tests/ParserTests/ParserTests.csproj index 1a298f4ac..7611a8b13 100644 --- a/Tests/ParserTests/ParserTests.csproj +++ b/Tests/ParserTests/ParserTests.csproj @@ -57,9 +57,18 @@ + + True + True + asterisks.feature + + + SpecFlowSingleFileGenerator + asterisks.feature.cs + @@ -112,6 +121,7 @@ + diff --git a/Tests/ParserTests/TestFiles/asterisks.feature.cs b/Tests/ParserTests/TestFiles/asterisks.feature.cs new file mode 100644 index 000000000..8f7109893 --- /dev/null +++ b/Tests/ParserTests/TestFiles/asterisks.feature.cs @@ -0,0 +1,77 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.3.2.0 +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +namespace ParserTests.TestFiles +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("a very simple feature")] + public partial class AVerySimpleFeatureFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "asterisks.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "a very simple feature", "", ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + [NUnit.Framework.TearDownAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("a simple scenario")] + public virtual void ASimpleScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("a simple scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 +testRunner.Given("some precondition"); +#line 5 +testRunner.Given("some precondition2"); +#line 6 +testRunner.When("I do something"); +#line 7 +testRunner.Given("I do something2"); +#line 8 +testRunner.Then("something happens"); +#line hidden + testRunner.CollectScenarioErrors(); + } + } +} +#endregion