本文整理汇总了C#中TechTalk.SpecFlow.ScenarioInfo类的典型用法代码示例。如果您正苦于以下问题:C# ScenarioInfo类的具体用法?C# ScenarioInfo怎么用?C# ScenarioInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScenarioInfo类属于TechTalk.SpecFlow命名空间,在下文中一共展示了ScenarioInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InvalidateCollection
public virtual void InvalidateCollection(string entityTagStore, string[] exampleTags)
{
string[] @__tags = new string[] {
"cachecow_server"};
if ((exampleTags != null))
{
@__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags));
}
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Invalidate collection", @__tags);
#line 7
this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.Given(string.Format("I have an API running CacheCow Server and using {0} storage", entityTagStore), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 9
testRunner.And("I Create a new item", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 10
testRunner.And("Get the collection ETag as ETag1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 11
testRunner.When("I create a new item", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 12
testRunner.And("Get the collection ETag as ETag2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 13
testRunner.Then("I expect ETag1 to be different from ETag2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例2: TheDefaultCultureIsUsedForBindingsIfNotSpecified
public virtual void TheDefaultCultureIsUsedForBindingsIfNotSpecified()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("The default culture is used for bindings if not specified", ((string[])(null)));
#line 3
this.ScenarioSetup(scenarioInfo);
#line hidden
#line 4
testRunner.Given("a scenario \'Simple Scenario\' as", "Given I have entered 3.14 into the calculator", ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
#line 8
testRunner.And("the following step definition", "[Given(@\"I have entered (.+) into the calculator\")]\r\npublic void GivenIHaveEntere" +
"d(double number)\r\n{\r\nif (number != 3.14) throw new Exception(\"number converted i" +
"ncorrectly\");\r\n}", ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.When("I execute the tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Succeeded"});
table1.AddRow(new string[] {
"1"});
#line 17
testRunner.Then("the execution summary should contain", ((string)(null)), table1, "Then ");
#line hidden
this.ScenarioCleanup();
}
示例3: DisplayAndDismissAnAlertBox
public virtual void DisplayAndDismissAnAlertBox()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Display and dismiss an alert box", ((string[])(null)));
#line 3
this.ScenarioSetup(scenarioInfo);
#line 4
testRunner.Given("I navigated to the Home page", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 5
testRunner.And("I chose New Information", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 6
testRunner.And("I was on the Information page", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 7
testRunner.When("I choose Alert Box", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 8
testRunner.And("I see an alert box and select Ok", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Field",
"Rule",
"Value"});
table1.AddRow(new string[] {
"Result",
"Equals",
"Alert Cleared"});
#line 9
testRunner.Then("I see", ((string)(null)), table1, "Then ");
#line hidden
this.ScenarioCleanup();
}
示例4: FullyArmed
public virtual void FullyArmed()
{
var scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fully armed", ((string[]) (null)));
#line 7
this.ScenarioSetup(scenarioInfo);
#line hidden
var table1 = new TechTalk.SpecFlow.Table(new string[]
{
"belt_level",
"katana",
"sake",
"fought",
"magic"
});
table1.AddRow(new string[]
{
"third",
"two",
"three",
"samurai",
"five"
});
#line 8
testRunner.Given("a ninja with the following experience", ((string) (null)), table1);
#line 11
testRunner.When("attacked by a samurai");
#line 12
testRunner.Then("the ninja should engage the opponent");
#line hidden
testRunner.CollectScenarioErrors();
}
示例5: AddPizza
public virtual void AddPizza()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add Pizza", ((string[])(null)));
#line 4
this.ScenarioSetup(scenarioInfo);
#line 5
testRunner.Given("I have navigated to Pizza/Compose page", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 6
testRunner.And("I wait 5 seconds", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Name"});
table1.AddRow(new string[] {
"pizzaName"});
#line 7
testRunner.When("I enter pizza data", ((string)(null)), table1, "When ");
#line 10
testRunner.And("I have selected ingredients", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 11
testRunner.And("I press add pizza button", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 12
testRunner.Then("I wait 5 seconds", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 13
testRunner.And("Should go to Pizza", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
this.ScenarioCleanup();
}
示例6: LookUpTests_Normal
public virtual void LookUpTests_Normal()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("LookUpTests - Normal", ((string[])(null)));
#line 5
this.ScenarioSetup(scenarioInfo);
#line 6
testRunner.Given("SpecAid Setting UseHashTag is \'true\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Tag It",
"anInt"});
table1.AddRow(new string[] {
"#Everything",
"12"});
#line 8
testRunner.Given("There are EveryThing Objects", ((string)(null)), table1, "Given ");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"!LookUp",
"anInt"});
table2.AddRow(new string[] {
"#Everything",
"12"});
#line 12
testRunner.Then("There are EveryThing Objects via Lookup", ((string)(null)), table2, "Then ");
#line hidden
this.ScenarioCleanup();
}
示例7: ChangeTextOnALabelInASubreport
public virtual void ChangeTextOnALabelInASubreport()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Change text on a label in a subreport", new string[] {
"mytag"});
#line 7
this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.Given("A report exists");
#line 9
testRunner.And("the report has an XRLabel named ChangeMe in the header");
#line 10
testRunner.And("ChangeMe\'s text property has a value of Brodie");
#line 11
testRunner.And("the report has another XRLabel named DontChangeMe in header");
#line 12
testRunner.And("DontChangeMe\'s text property has a value of GreenBayPackers");
#line 13
testRunner.And("an action exists against an XRLabel named ChangeMe to change the name to Camp and" +
" increment a counter");
#line 14
testRunner.And("the xtrasubreport engine is initialized");
#line 15
testRunner.When("the report engine runs");
#line 16
testRunner.Then("ChangeMe\'s text property should have a value of Camp");
#line 17
testRunner.And("DontChangeMe\'s text property should have a value of GreenBayPackers");
#line 18
testRunner.And("the counter incremented by the action should have a count of 1");
#line hidden
this.ScenarioCleanup();
}
示例8: RootRequestShowsSetupForm
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 hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"extension",
"names"});
table1.AddRow(new string[] {
"Module",
"Orchard.Setup, Orchard.Pages, Orchard.ContentPicker, Orchard.Users, Orchard.Roles" +
", Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orc" +
"hard.jQuery, TinyMce"});
table1.AddRow(new string[] {
"Core",
"Common, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Xml" +
"Rpc, Title"});
table1.AddRow(new string[] {
"Theme",
"SafeMode"});
#line 7
testRunner.Given("I have a clean site with", ((string)(null)), table1, "Given ");
#line 12
testRunner.When("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 13
testRunner.Then("I should see \"Welcome to Orchard\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 14
testRunner.And("I should see \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 15
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
this.ScenarioCleanup();
}
示例9: RemoveFurtherActionTaskToRiskAssessment
public virtual void RemoveFurtherActionTaskToRiskAssessment()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove Further Action Task To Risk Assessment", new string[] {
"Acceptance",
"RemoveFurtherActionTask"});
#line 11
this.ScenarioSetup(scenarioInfo);
#line 6
this.FeatureBackground();
#line 12
testRunner.Given("I am on the risk assessment index page for company \'55881\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 13
testRunner.And("I have clicked on the edit risk assessment link for id \'39\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 14
testRunner.And("I press \'controlmeasures\' link", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 15
testRunner.And("I have waited for the page to reload", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.And("I click on the further action task row for id \'11\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 17
testRunner.When("I press \'Remove\' button on the further action task row", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 18
testRunner.And("I select \'yes\' on confirmation", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 19
testRunner.Then("the further action task with id \'11\' should be deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例10: ICanCreateAndPublishANewPageWithInternationalCharactersInItsRoute
public virtual void ICanCreateAndPublishANewPageWithInternationalCharactersInItsRoute()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create and publish a new Page with international characters in its route", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 8
testRunner.When("I go to \"admin/contents/create/page\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table1.AddRow(new string[] {
"Title.Title",
"Χελλο"});
#line 9
testRunner.And("I fill in", ((string)(null)), table1, "And ");
#line 12
testRunner.And("I hit \"Publish Now\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 13
testRunner.And("I go to \"Χελλο\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 14
testRunner.Then("I should see \"<h1[^>]*>.*?Χελλο.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例11: SignOutPreventsAccessToProtectedPages
public virtual void SignOutPreventsAccessToProtectedPages(string user, string[] exampleTags)
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Sign Out prevents access to protected pages", exampleTags);
#line 6
this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.Given(string.Format("I am signed in as {0}", user));
#line 9
testRunner.Then("I should see a \"Sign Out\" link");
#line 11
testRunner.When("I click the \"Sign Out\" link");
#line 12
testRunner.Then("I should see the Sign Out page");
#line 14
testRunner.When("I enter the URL for the Personal Home page");
#line 15
testRunner.Then("I should see the Sign On page");
#line 17
testRunner.When("I enter the URL for the Institutional Agreement Management page");
#line 18
testRunner.Then("I should see the Sign On page");
#line 20
testRunner.When("I enter the URL for the Institutional Agreement Configure Module page");
#line 21
testRunner.Then("I should see the Sign On page");
#line hidden
this.ScenarioCleanup();
}
示例12: AddTitle
public virtual void AddTitle()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add Title", ((string[])(null)));
#line 11
this.ScenarioSetup(scenarioInfo);
#line 8
this.FeatureBackground();
#line 12
testRunner.Given("I am on create riskassessment page in area \'PersonalRiskAssessments\' with company" +
" Id \'55881\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 13
testRunner.And("I have entered \'Test Title\' into the \'Title\' field", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 14
testRunner.And("I have entered \'Test Reference\' into the \'Reference\' field", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 15
testRunner.When("I press \'createSummary\' button", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 16
testRunner.And("I have waited for the page to reload", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 17
testRunner.Then("the text box with id \'Title\' should contain \'Test Title\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 18
testRunner.Then("the text box with id \'Reference\' should contain \'Test Reference\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例13: DeletingASiteGroup
public virtual void DeletingASiteGroup()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deleting a site group", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I have logged in as company with id \'37634\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 8
testRunner.And("I have navigated to site structure page", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 9
testRunner.And("I have site group called \'site group to delete\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 10
testRunner.And("I have selected site group called \'site group to delete\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 11
testRunner.When("I press \'deleteSiteBtn\' button", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 12
testRunner.And("I select \'No\' on confirmation", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 13
testRunner.Then("I should remain on the site group details", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 14
testRunner.When("I press \'deleteSiteBtn\' button", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 15
testRunner.And("I select \'Yes\' on confirmation", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.Then("the site group should be deleted", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例14: CanAddDocumentToAddedDocuments
public virtual void CanAddDocumentToAddedDocuments()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Can add document to Added Documents", new string[] {
"createsAddedDocument"});
#line 7
this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.Given("I have logged in as company with id \'55881\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 9
testRunner.And("I navigate to added documents", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 10
testRunner.And("I press link with ID \'AddNewDocumentsLink\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 11
testRunner.And("It is simulated that an added document has been uploaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 12
testRunner.And("I have entered \'Checklist\' into the \'DocumentGridRow_53984_DocumentType\' field", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 13
testRunner.And("I have entered \'Barnsley\' into the \'DocumentGridRow_53984_Site\' field", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 14
testRunner.And("I have entered \'test title\' into the \'DocumentGridRow_53984_Title\' field", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 15
testRunner.And("I have entered \'test description\' into the \'DocumentGridRow_53984_Description\' fi" +
"eld", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.When("I press \'SaveAddedDocuments\' button", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 17
testRunner.Then("the file is saved to the database", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
示例15: StepsCanDefinedInAnExternal_NETE_G_COrVB_NETProject
public virtual void StepsCanDefinedInAnExternal_NETE_G_COrVB_NETProject()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Steps can defined in an external .NET (e.g. c# or VB.NET) project", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("there is an external class library project \'ExternalSteps\'");
#line hidden
#line 8
testRunner.And("the following step definition in the external library", "[When(@\"I do something\")]\r\npublic void WhenIDoSomething()\r\n{\r\n}", ((TechTalk.SpecFlow.Table)(null)));
#line 15
testRunner.And("there is a SpecFlow project with a reference to the external library");
#line hidden
#line 16
testRunner.And("a scenario \'Simple Scenario\' as", "When I do something", ((TechTalk.SpecFlow.Table)(null)));
#line hidden
#line 20
testRunner.And("the specflow configuration is", "<specFlow>\r\n<stepAssemblies>\r\n<stepAssembly assembly=\"ExternalSteps\" />\r\n</stepAs" +
"semblies>\r\n</specFlow>", ((TechTalk.SpecFlow.Table)(null)));
#line 28
testRunner.When("I execute the tests");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Succeeded"});
table1.AddRow(new string[] {
"1"});
#line 29
testRunner.Then("the execution summary should contain", ((string)(null)), table1);
#line hidden
this.ScenarioCleanup();
}