当前位置: 首页>>代码示例>>C#>>正文


C# SpecFlow.Table类代码示例

本文整理汇总了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();
        }
开发者ID:hello-mean,项目名称:glsec-2014,代码行数:25,代码来源:Registration.feature.cs

示例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();
        }
开发者ID:piotrowskislawomir,项目名称:PizzaOnline,代码行数:27,代码来源:PizzaFeature.feature.cs

示例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();
        }
开发者ID:DuncanButler,项目名称:SpecSalad,代码行数:32,代码来源:ListContainingSpecifications.feature.cs

示例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();
        }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:34,代码来源:RegisterUser.feature.cs

示例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();
        }
开发者ID:Redabenmeradi,项目名称:cuke4ninja,代码行数:31,代码来源:ninja_survival_rate_tables.feature.cs

示例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()));
 }
开发者ID:drypa,项目名称:Nelibur,代码行数:7,代码来源:GetSteps.cs

示例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();
        }
开发者ID:Redabenmeradi,项目名称:cuke4ninja,代码行数:33,代码来源:ninja_survival_rate_with_parameters.feature.cs

示例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;
 }
开发者ID:GSerjo,项目名称:CodeProject,代码行数:7,代码来源:PostSteps.cs

示例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();
        }
开发者ID:lopezn,项目名称:specbind,代码行数:28,代码来源:PageNavigationStepsFixture.cs

示例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
        }
开发者ID:TomJerrum,项目名称:FinalYearProjectBlog,代码行数:29,代码来源:Comment.feature.cs

示例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();
        }
开发者ID:ITAGroup,项目名称:SpecAid,代码行数:27,代码来源:TutorialWhatIf.feature.cs

示例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();
        }
开发者ID:elbandit,项目名称:CQRS-Minesweeper,代码行数:27,代码来源:Losing.feature.cs

示例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();
        }
开发者ID:modulexcite,项目名称:framework-1,代码行数:31,代码来源:NewsManagementNewsArticleRepository.feature.cs

示例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
        }
开发者ID:GabyZu,项目名称:SpecFlow-Examples,代码行数:28,代码来源:US02_HomeScreen.feature.cs

示例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
        }
开发者ID:NehadHajjaj,项目名称:AccountManager,代码行数:28,代码来源:AccountDataManagement.feature.cs


注:本文中的TechTalk.SpecFlow.Table类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。