Fixing unit tests for CI

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-11-29 11:29:50 -08:00
parent 198a8283eb
commit 63c2ac7d98
+25 -12
View File
@@ -1,20 +1,22 @@
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/). // This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.4.0.0 // SpecFlow Version:1.8.1.0
// Runtime Version:4.0.30319.1 // SpecFlow Generator Version:1.8.0.0
// Runtime Version:4.0.30319.239
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
#region Designer generated code #region Designer generated code
#pragma warning disable
namespace Orchard.Profile.Tests namespace Orchard.Profile.Tests
{ {
using TechTalk.SpecFlow; using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Profiling")] [NUnit.Framework.DescriptionAttribute("Profiling")]
@@ -30,8 +32,8 @@ namespace Orchard.Profile.Tests
public virtual void FeatureSetup() public virtual void FeatureSetup()
{ {
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Profiling", "In order to profile the site\r\nAs a developer\r\nI want to generate a fixed number o" + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Profiling", " In order to profile the site\r\n As a developer\r\n I want to generate a fixed nu" +
"f repeatable requests", GenerationTargetLanguage.CSharp, ((string[])(null))); "mber of repeatable requests", ProgrammingLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo); testRunner.OnFeatureStart(featureInfo);
} }
@@ -42,9 +44,9 @@ namespace Orchard.Profile.Tests
testRunner = null; testRunner = null;
} }
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) [NUnit.Framework.SetUpAttribute()]
public virtual void TestInitialize()
{ {
testRunner.OnScenarioStart(scenarioInfo);
} }
[NUnit.Framework.TearDownAttribute()] [NUnit.Framework.TearDownAttribute()]
@@ -53,6 +55,16 @@ namespace Orchard.Profile.Tests
testRunner.OnScenarioEnd(); testRunner.OnScenarioEnd();
} }
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioStart(scenarioInfo);
}
public virtual void ScenarioCleanup()
{
testRunner.CollectScenarioErrors();
}
[NUnit.Framework.TestAttribute()] [NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Warmup")] [NUnit.Framework.DescriptionAttribute("Warmup")]
public virtual void Warmup() public virtual void Warmup()
@@ -69,7 +81,7 @@ this.ScenarioSetup(scenarioInfo);
#line 10 #line 10
testRunner.When("I go to \"/\""); testRunner.When("I go to \"/\"");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); this.ScenarioCleanup();
} }
[NUnit.Framework.TestAttribute()] [NUnit.Framework.TestAttribute()]
@@ -84,7 +96,7 @@ this.ScenarioSetup(scenarioInfo);
#line 14 #line 14
testRunner.When("I go to \"/admin\" 40 times"); testRunner.When("I go to \"/admin\" 40 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); this.ScenarioCleanup();
} }
[NUnit.Framework.TestAttribute()] [NUnit.Framework.TestAttribute()]
@@ -107,7 +119,7 @@ this.ScenarioSetup(scenarioInfo);
#line 22 #line 22
testRunner.When("I go to \"/blog4\" 10 times"); testRunner.When("I go to \"/blog4\" 10 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); this.ScenarioCleanup();
} }
[NUnit.Framework.TestAttribute()] [NUnit.Framework.TestAttribute()]
@@ -126,8 +138,9 @@ this.ScenarioSetup(scenarioInfo);
#line 29 #line 29
testRunner.When("I go to \"/\" 10 times"); testRunner.When("I go to \"/\" 10 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); this.ScenarioCleanup();
} }
} }
} }
#pragma warning restore
#endregion #endregion