// ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:1.5.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.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Addition")] public partial class AdditionFeature { private static TechTalk.SpecFlow.ITestRunner testRunner; #line 1 "PermissionModel.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"), "Addition", "In order to prevent security model regressions\r\nAs a user with specific permissio" + "ns\r\nI should to be granted or denied access to various actions", 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("Login can be automated")] [NUnit.Framework.CategoryAttribute("security")] public virtual void LoginCanBeAutomated() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Login can be automated", new string[] { "security"}); #line 7 this.ScenarioSetup(scenarioInfo); #line 8 testRunner.Given("I have installed Orchard"); #line 9 testRunner.And("I have a user \"bob\" with permissions \"AccessFrontEnd\""); #line 10 testRunner.When("I go to \"users/account/logoff\""); #line 11 testRunner.And("I go to \"users/account/logon\""); #line hidden TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { "name", "value"}); table1.AddRow(new string[] { "userNameOrEmail", "bob"}); table1.AddRow(new string[] { "password", "qwerty123!"}); #line 12 testRunner.And("I fill in", ((string)(null)), table1); #line 16 testRunner.And("I hit \"Sign In\""); #line 17 testRunner.And("I am redirected"); #line 18 testRunner.Then("I should see \"Welcome\""); #line 19 testRunner.And("I should see \"bob\""); #line hidden testRunner.CollectScenarioErrors(); } [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Anonymous user can see the home page but not the dashboard")] [NUnit.Framework.CategoryAttribute("security")] public virtual void AnonymousUserCanSeeTheHomePageButNotTheDashboard() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Anonymous user can see the home page but not the dashboard", new string[] { "security"}); #line 22 this.ScenarioSetup(scenarioInfo); #line 23 testRunner.Given("I have installed Orchard"); #line 24 testRunner.And("I have a user \"bob\" with permissions \"AccessFrontEnd\""); #line 25 testRunner.When("I sign in as \"bob\""); #line 26 testRunner.Then("I should see \"this is the homepage of your new site\" when I go to \"/\""); #line 27 testRunner.And("I should be denied access when I go to \"admin\""); #line hidden testRunner.CollectScenarioErrors(); } } } #endregion