From cf9d23e1b3d995e9561b271a599367805dbac16d Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 16 Nov 2010 15:29:31 -0800 Subject: [PATCH] Adding Admin feature spec test --HG-- branch : dev --- src/Orchard.Specs/Admin.feature | 9 ++++ src/Orchard.Specs/Admin.feature.cs | 74 ++++++++++++++++++++++++++ src/Orchard.Specs/Orchard.Specs.csproj | 9 ++++ 3 files changed, 92 insertions(+) create mode 100644 src/Orchard.Specs/Admin.feature create mode 100644 src/Orchard.Specs/Admin.feature.cs diff --git a/src/Orchard.Specs/Admin.feature b/src/Orchard.Specs/Admin.feature new file mode 100644 index 000000000..f6ef8c581 --- /dev/null +++ b/src/Orchard.Specs/Admin.feature @@ -0,0 +1,9 @@ +Feature: The Admin side of the app + In order to manage my site + As a privileged user + I want to not have my cheese moved in the admin + +Scenario: The current version of Orchard is displayed in the admin + Given I have installed Orchard + When I go to "admin" + Then I should see "
Orchard v(?:\.\d+){2,4}
" diff --git a/src/Orchard.Specs/Admin.feature.cs b/src/Orchard.Specs/Admin.feature.cs new file mode 100644 index 000000000..0618ba599 --- /dev/null +++ b/src/Orchard.Specs/Admin.feature.cs @@ -0,0 +1,74 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.4.0.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 Orchard.Specs +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("The Admin side of the app")] + public partial class TheAdminSideOfTheAppFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Admin.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"), "The Admin side of the app", "In order to manage my site\nAs a privileged user\nI want to not have my cheese move" + + "d in the admin", GenerationTargetLanguage.CSharp, ((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("The current version of Orchard is displayed in the admin")] + public virtual void TheCurrentVersionOfOrchardIsDisplayedInTheAdmin() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("The current version of Orchard is displayed in the admin", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Given("I have installed Orchard"); +#line 8 + testRunner.When("I go to \"admin\""); +#line 9 + testRunner.Then("I should see \"
Orchard v(?:\\.\\d+){2,4}
\""); +#line hidden + testRunner.CollectScenarioErrors(); + } + } +} +#endregion diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj index 5bf472d3f..69de2741b 100644 --- a/src/Orchard.Specs/Orchard.Specs.csproj +++ b/src/Orchard.Specs/Orchard.Specs.csproj @@ -123,6 +123,11 @@ + + True + True + Admin.feature + @@ -205,6 +210,10 @@ Always + + SpecFlowSingleFileGenerator + Admin.feature.cs + SpecFlowSingleFileGenerator Blogs.feature.cs