Adding Admin feature spec test

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-11-16 15:29:31 -08:00
parent 50da9410f5
commit cf9d23e1b3
3 changed files with 92 additions and 0 deletions

View File

@@ -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 "<div id="orchard-version">Orchard v(?:\.\d+){2,4}</div>"

74
src/Orchard.Specs/Admin.feature.cs generated Normal file
View File

@@ -0,0 +1,74 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
// ------------------------------------------------------------------------------
#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 \"<div id=\"orchard-version\">Orchard v(?:\\.\\d+){2,4}</div>\"");
#line hidden
testRunner.CollectScenarioErrors();
}
}
}
#endregion

View File

@@ -123,6 +123,11 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Admin.feature.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Admin.feature</DependentUpon>
</Compile>
<Compile Include="Bindings\BindingBase.cs" />
<Compile Include="Bindings\CommandLine.cs" />
<Compile Include="Bindings\ContentRights.cs" />
@@ -205,6 +210,10 @@
<Content Include="Hosting\Orchard.Web\Config\Sites.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Admin.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>Admin.feature.cs</LastGenOutput>
</None>
<None Include="Blogs.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>Blogs.feature.cs</LastGenOutput>