本文整理汇总了C#中TechTalk.SpecFlow.Table类的典型用法代码示例。如果您正苦于以下问题:C# Table类的具体用法?C# Table怎么用?C# Table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Table类属于TechTalk.SpecFlow命名空间,在下文中一共展示了Table类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisteringAnUnusedEmailAddress
public virtual void RegisteringAnUnusedEmailAddress()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Registering an unused email address", ((string[])(null)));
#line 5
this.ScenarioSetup(scenarioInfo);
#line 6
testRunner.Given("I am on page \"User.Register\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Email",
"Name",
"Password"});
table1.AddRow(new string[] {
"[email protected]",
"Test User2",
"password"});
#line 7
testRunner.When("I submit the form using", ((string)(null)), table1, "When ");
#line 10
testRunner.Then("A cookie named \".ASPXAUTH\" should exist", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 11
testRunner.And("I should be redirected to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
this.ScenarioCleanup();
}
示例2: 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();
}
示例3: AListContainingSyntax
public virtual void AListContainingSyntax()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("a list containing syntax", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I am a list specification", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"colours"});
table1.AddRow(new string[] {
"Red"});
table1.AddRow(new string[] {
"Green"});
table1.AddRow(new string[] {
"Blue"});
#line 8
testRunner.And("I can see the list of available colours", ((string)(null)), table1, "And ");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"colours"});
table2.AddRow(new string[] {
"Red"});
table2.AddRow(new string[] {
"Green"});
table2.AddRow(new string[] {
"Blue"});
#line 13
testRunner.Then("I should see a list of available colours containing", ((string)(null)), table2, "Then ");
#line hidden
this.ScenarioCleanup();
}
示例4: RegisterUser
public virtual void RegisterUser()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Register User", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I am on the site home page");
#line 8
testRunner.When("I click the Register link");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Control",
"Value"});
table1.AddRow(new string[] {
"User Name",
"RegisterUserTest"});
table1.AddRow(new string[] {
"Email",
"[email protected]"});
table1.AddRow(new string[] {
"Password",
"password"});
table1.AddRow(new string[] {
"Display Name",
"RegisterUserTest DN"});
#line 9
testRunner.And("I fill in the Register User form", ((string)(null)), table1);
#line 15
testRunner.And("I click the Register button");
#line 16
testRunner.Then("I am logged in as the RegisterUserTest DN user");
#line hidden
this.ScenarioCleanup();
}
示例5: 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();
}
示例6: ThenIRequestDataThruGetAction
public void ThenIRequestDataThruGetAction(Table table)
{
Order expected = table.CreateSet<Order>().Single();
var actual = (List<Order>)ScenarioContext.Current[ResopnseKey];
Assert.Equal(1, actual.Count);
Assert.True(expected.Equals(actual.Single()));
}
示例7: FullyArmed
public virtual void FullyArmed()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fully armed", ((string[])(null)));
#line 7
this.ScenarioSetup(scenarioInfo);
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Field",
"Value"});
table1.AddRow(new string[] {
"BeltLevel",
"third"});
table1.AddRow(new string[] {
"Katana",
"two"});
table1.AddRow(new string[] {
"Sake",
"three"});
table1.AddRow(new string[] {
"Fought",
"samurai"});
table1.AddRow(new string[] {
"Magic",
"five"});
#line 8
testRunner.Given("a ninja with the following parameterized experience", ((string)(null)), table1);
#line 16
testRunner.When("attacked by a samurai");
#line 17
testRunner.Then("the ninja should engage the opponent");
#line hidden
testRunner.CollectScenarioErrors();
}
示例8: WhenISendDataThruPostWithResponseAction
public void WhenISendDataThruPostWithResponseAction(Table table)
{
Order order = table.CreateSet<Order>().Single();
JsonServiceClient client = GetClient();
var response = client.Post<bool>(order);
ScenarioContext.Current[ResopnseKey] = response;
}
示例9: TestGivenNavigateToPageStepWithArguments
public void TestGivenNavigateToPageStepWithArguments()
{
var testPage = new Mock<IPage>();
var pipelineService = new Mock<IActionPipelineService>(MockBehavior.Strict);
pipelineService.Setup(p => p.PerformAction<PageNavigationAction>(
null,
It.Is<PageNavigationAction.PageNavigationActionContext>(c => c.PropertyName == "mypage" &&
c.PageAction == PageNavigationAction.PageAction.NavigateToPage &&
c.PageArguments != null && c.PageArguments.Count == 2)))
.Returns(ActionResult.Successful(testPage.Object));
var scenarioContext = new Mock<IScenarioContextHelper>(MockBehavior.Strict);
scenarioContext.Setup(s => s.SetValue(It.IsAny<IPage>(), PageStepBase.CurrentPageKey));
var tokenManager = new Mock<ITokenManager>(MockBehavior.Strict);
tokenManager.Setup(t => t.GetToken(It.IsAny<string>())).Returns<string>(s => s);
var steps = new PageNavigationSteps(scenarioContext.Object, pipelineService.Object, tokenManager.Object);
var table = new Table("Id", "Part");
table.AddRow("1", "A");
steps.GivenNavigateToPageWithArgumentsStep("mypage", table);
scenarioContext.VerifyAll();
pipelineService.VerifyAll();
}
示例10: FeatureBackground
public virtual void FeatureBackground()
{
#line 5
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Forename",
"Surname",
"PcName"});
table1.AddRow(new string[] {
"Tom",
"Jerrum",
"DESKTOP-3L5QH7C\\tomje"});
#line 6
testRunner.Given("I have the following users stored", ((string)(null)), table1, "Given ");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"Title",
"Contents",
"Author"});
table2.AddRow(new string[] {
"Test 1",
"Test blog post 1",
"Tom Jerrum"});
#line 9
testRunner.And("I have the following blog posts stored", ((string)(null)), table2, "And ");
#line 12
testRunner.And("I am the following user \'DESKTOP-3L5QH7C\\tomje\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
}
示例11: WhatIfThereIsNoSpoon
public virtual void WhatIfThereIsNoSpoon()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("What If There Is No Spoon", new string[] {
"TutorialNoSpoonSteps"});
#line 7
this.ScenarioSetup(scenarioInfo);
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"First Name",
"Last Name"});
table1.AddRow(new string[] {
"Fox",
"Smith"});
#line 9
testRunner.Given("I have a Person", ((string)(null)), table1, "Given ");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"First Name",
"Last Name"});
table2.AddRow(new string[] {
"Fox",
"Smith"});
#line 13
testRunner.Then("There is a Person", ((string)(null)), table2, "Then ");
#line hidden
this.ScenarioCleanup();
}
示例12: RevealAllTilesThatArenTMinesAndWinTheGame
public virtual void RevealAllTilesThatArenTMinesAndWinTheGame()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reveal all tiles that aren\'t mines and win the game", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#line 7
testRunner.Given("I have started a new game \"minefield size of 9 x 9 (10 mines)\"");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Row",
"Column"});
table1.AddRow(new string[] {
"2",
"2"});
#line 8
testRunner.And("the minefield contains the following mines:", ((string)(null)), table1);
#line 11
testRunner.When("I navigate to the game play page");
#line 12
testRunner.And("I click on the tile at coordinate 2,2");
#line 13
testRunner.Then("I should see a message telling me that \"You have lost!\"");
#line 14
testRunner.And("I should see a button labelled \"Start New Game\"");
#line hidden
this.ScenarioCleanup();
}
示例13: CreateANewsManagementArticleInATransaction
public virtual void CreateANewsManagementArticleInATransaction()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Create a News Management Article in a transaction", ((string[])(null)));
#line 4
this.ScenarioSetup(scenarioInfo);
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"CreatedBy",
"Title",
"Content"});
table1.AddRow(new string[] {
"Jonathan",
"Test Title",
"Test Content"});
#line 5
testRunner.Given("I have a news management article with the properties", ((string)(null)), table1);
#line 8
testRunner.When("I attempt to create the article in a transaction");
#line 9
testRunner.Then("the repository result will be true");
#line 10
testRunner.And("the article repository count should be 1");
#line 11
testRunner.And("the Creator will be Jonathan");
#line 12
testRunner.And("the Title will be Test Title");
#line 13
testRunner.And("the Content will be Test Content");
#line hidden
this.ScenarioCleanup();
}
示例14: FeatureBackground
public virtual void FeatureBackground()
{
#line 7
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"Author",
"Title",
"Price"});
table1.AddRow(new string[] {
"Martin Fowler",
"Analysis Patterns",
"50.20"});
table1.AddRow(new string[] {
"Eric Evans",
"Domain Driven Design",
"46.34"});
table1.AddRow(new string[] {
"Ted Pattison",
"Inside Windows SharePoint Services",
"31.49"});
table1.AddRow(new string[] {
"Gojko Adzic",
"Bridging the Communication Gap",
"24.75"});
#line 8
testRunner.Given("the following books", ((string)(null)), table1, "Given ");
#line hidden
}
示例15: FeatureBackground
public virtual void FeatureBackground()
{
#line 3
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"password",
"email",
"mobile",
"gender",
"activated"});
table1.AddRow(new string[] {
"Tala",
"[email protected]",
"[email protected]",
"00972598",
"Female",
"yes"});
#line 4
testRunner.Given("I am registered with the following data:", ((string)(null)), table1, "Given ");
#line 8
testRunner.And("I\'m logged in", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 10
testRunner.And("I am on \"home\" page", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 11
testRunner.When("I click on \"MyAccount\" link", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
}