mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Integrating SpecFlow
asp.net inprocess appdomain utilized for integration style testing feature files generate nunit tests at "save time" with vs specflow 1.2 installed micro orchard site created dynamically in temp folder as a given step cross-domain delegate invokation based on the excellent work of Steve Sanderson http://blog.stevensanderson.com/ --HG-- branch : dev
This commit is contained in:
103
src/Orchard.Specs/Setup.feature.cs
generated
Normal file
103
src/Orchard.Specs/Setup.feature.cs
generated
Normal file
@@ -0,0 +1,103 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.2.0.0
|
||||
// Runtime Version:2.0.50727.4200
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
namespace Orchard.Specs
|
||||
{
|
||||
using TechTalk.SpecFlow;
|
||||
|
||||
|
||||
[NUnit.Framework.TestFixtureAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Setup")]
|
||||
public partial class SetupFeature
|
||||
{
|
||||
|
||||
private static TechTalk.SpecFlow.ITestRunner testRunner;
|
||||
|
||||
#line 1 "Setup.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"), "Setup", "In order to install orchard\r\nAs a new user\r\nI want to setup a new site from the d" +
|
||||
"efault screen", ((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("Root request shows setup form")]
|
||||
public virtual void RootRequestShowsSetupForm()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Root request shows setup form", ((string[])(null)));
|
||||
#line 6
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 7
|
||||
testRunner.Given("I have a clean site");
|
||||
#line 8
|
||||
testRunner.And("I have module \"Orchard.Setup\"");
|
||||
#line 9
|
||||
testRunner.And("I have theme \"SafeMode\"");
|
||||
#line 10
|
||||
testRunner.When("I go to \"/Default.aspx\"");
|
||||
#line 11
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"");
|
||||
#line 12
|
||||
testRunner.And("I should see \"Finish Setup\"");
|
||||
#line 13
|
||||
testRunner.And("the status should be 200 OK");
|
||||
#line hidden
|
||||
testRunner.CollectScenarioErrors();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Setup folder also shows setup form")]
|
||||
public virtual void SetupFolderAlsoShowsSetupForm()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Setup folder also shows setup form", ((string[])(null)));
|
||||
#line 15
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 16
|
||||
testRunner.Given("I have a clean site");
|
||||
#line 17
|
||||
testRunner.And("I have module \"Orchard.Setup\"");
|
||||
#line 18
|
||||
testRunner.And("I have theme \"SafeMode\"");
|
||||
#line 19
|
||||
testRunner.When("I go to \"/Setup\"");
|
||||
#line 20
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"");
|
||||
#line 21
|
||||
testRunner.And("I should see \"Finish Setup\"");
|
||||
#line 22
|
||||
testRunner.And("the status should be 200 OK");
|
||||
#line hidden
|
||||
testRunner.CollectScenarioErrors();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user