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


C# Table.CreateSet方法代码示例

本文整理汇总了C#中TechTalk.SpecFlow.Table.CreateSet方法的典型用法代码示例。如果您正苦于以下问题:C# Table.CreateSet方法的具体用法?C# Table.CreateSet怎么用?C# Table.CreateSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TechTalk.SpecFlow.Table的用法示例。


在下文中一共展示了Table.CreateSet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WhenTheTable_BackedViewIsCreated

 public void WhenTheTable_BackedViewIsCreated(string viewName, Table table)
 {
     var definition = new TableDefinition("tbl" + viewName);
     definition.Columns.AddFromRaw(table.CreateSet<ColumnDefinitionRaw>());
     definition.CreateOrReplace(database);
     definition.CreateView(database, viewName);
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:7,代码来源:ViewSteps.cs

示例2: ThenTheDefinitionOfViewShouldMatchSystemTablesDefinition

 public void ThenTheDefinitionOfViewShouldMatchSystemTablesDefinition(string viewName, Table table)
 {
     var definition = new TableDefinition(viewName);
     definition.Columns.AddFromRaw(table.CreateSet<ColumnDefinitionRaw>());
     var checker = new ViewCheck(database.ConnectionString);
     checker.VerifyMatch(definition, TableDefinitionInterrogationStrategyType.SystemTables);
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:7,代码来源:ViewSteps.cs

示例3: 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

示例4: GivenTheTableIsCreatedInTheSchema

 public void GivenTheTableIsCreatedInTheSchema(string tableName, string schemaName, Table table)
 {
     var tableActions = new TableActions(database.ConnectionString);
     var def = new TableDefinition(new DatabaseObjectName(schemaName, tableName));
     def.Columns.AddFromRaw(table.CreateSet<ColumnDefinitionRaw>());
     tableActions.Create(def);
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:7,代码来源:SchemaSteps.cs

示例5: GivenADefaultSetOfWhingers

 public void GivenADefaultSetOfWhingers(Table table)
 {
     foreach (var item in table.CreateSet<WhingerEntity>())
     {
         WhingePoolApplicationContext.WhingersTable.EnsureInstance(item);
     }
 }
开发者ID:GarthOrmsby,项目名称:WhingePool,代码行数:7,代码来源:BackgroundSteps.cs

示例6: GivenTheProcedureIsCreatedWithBody

 public void GivenTheProcedureIsCreatedWithBody(string procedureName, string body, Table table)
 {
     ProcedureDefinition definition = new ProcedureDefinition(DatabaseObjectName.FromName(procedureName));
     definition.Parameters.AddFromRaw(table.CreateSet<ProcedureParameterRaw>());
     definition.Body = body;
     definition.CreateOrReplace(database);
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:7,代码来源:ProcedureSteps.cs

示例7: GivenTheVoucherProcessMetadataContainsTheFollowingData

        public void GivenTheVoucherProcessMetadataContainsTheFollowingData(Table table)
        {
            var folder = ScenarioContext.Current.Get<string>("folder");
            var voucher = ScenarioContext.Current.Get<Voucher>("voucher");
            var voucherBatch = ScenarioContext.Current.Get<VoucherBatch>("voucherBatch");

            var voucherProcesses = table.CreateSet<VoucherProcess>().ToList();

            if (voucherProcesses.Count() != 1)
            {
                Assert.Inconclusive("Currently only 1 voucherProcess is supported");
            }

            var imageExchangeVoucher = new ImageExchangeVoucher
            {
                voucher = voucher,
                voucherBatch = voucherBatch,
                voucherProcess = voucherProcesses.Single()
            };

            var voucherFilePrefix = string.Format("VOUCHER_{0}_{1}", voucher.processingDate.ToString("ddMMyyyy"), voucher.documentReferenceNumber);
            var voucherFileFullPathAndPrefix = Path.Combine(folder, voucherFilePrefix);

            WriteMetaData(voucherFileFullPathAndPrefix, imageExchangeVoucher);
            WriteImage(voucherFileFullPathAndPrefix, "FRONT");
            WriteImage(voucherFileFullPathAndPrefix, "REAR");
        }
开发者ID:jhonner72,项目名称:plat,代码行数:27,代码来源:GivenVoucherDataSteps.cs

示例8: WhenIUpdateDataThruPutAsyncActionWithResponse

 public void WhenIUpdateDataThruPutAsyncActionWithResponse(Table table)
 {
     UpdateOrder request = table.CreateSet<UpdateOrder>().Single();
     JsonServiceClient client = GetClient();
     bool response = client.PutAsync<bool>(request).Result;
     ScenarioContext.Current[ResopnseKey] = response;
 }
开发者ID:GSerjo,项目名称:CodeProject,代码行数:7,代码来源:PutSteps.cs

示例9: WhenIAddTheFollowingItemsToOrder

        public void WhenIAddTheFollowingItemsToOrder(string orderNumber, Table table)
        {
            using (var context = new ShopAnyWareSql())
            {
                var order = context.Orders.SingleOrDefault(o => o.OrderNumber.Equals(orderNumber));
                Assert.IsNotNull(order);
                var contoller = this.GetItemsController();
                var itemViewModels = table.CreateSet<OrderItemViewModel>();
                var actuals = new List<OrderItemViewModel>();
                foreach (var itemViewModel in itemViewModels)
                {
                    itemViewModel.OrderId = order.Id;
                    var result = contoller.AddItemToOrder(itemViewModel) as JsonNetResult;
                    Assert.That(result, Is.Not.Null);
                    if (result == null)
                    {
                        continue;
                    }

                    var actual = result.Data as OrderItemViewModel;
                    actuals.Add(actual);
                }

                ScenarioContext.Current.Set(actuals);
            }
        }
开发者ID:Naviam,项目名称:Shop-Any-Ware,代码行数:26,代码来源:OrderItems.cs

示例10: 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

示例11: GivenIHaveASetOfPerformances

 public void GivenIHaveASetOfPerformances(Table table)
 {
     var performances = table.CreateSet<PerformanceScore>().ToList();
     var generator = new TeamScoreGenerator();
     var scores = generator.From(performances, null);
     _reporting = new TeamScoreReporting(scores);
 }
开发者ID:kijanawoodard,项目名称:AllStarScore,代码行数:7,代码来源:RankingSteps.cs

示例12: GivenThereIsATestWithTheFollowingTestItems

		public void GivenThereIsATestWithTheFollowingTestItems(Table table)
		{
			var itemList = table.CreateSet<TestItem>();
			var test = new Test(itemList);
			ScenarioContext.Current.Add(testKey, test);

			
		}
开发者ID:andrea-scarcella,项目名称:asp.net-mvc-experiments,代码行数:8,代码来源:TestEvaluationSteps.cs

示例13:

 public void Givenรายชอผโชคดทงหมดในระบบเปนดงน(Table table)
 {
     var winnerQry = table.CreateSet<WinnerInformation>();
     var mockRewardDac = ScenarioContext.Current.Get<Moq.Mock<IRewardDataAccess>>();
     mockRewardDac.Setup(dac => dac.GetAllWinners()).Returns(() => winnerQry);
     mockRewardDac.Setup(dac => dac.GetWinnersByUserId(It.IsAny<string>()))
         .Returns<string>(userId => winnerQry.Where(it => it.AccountSecrectCode.Equals(userId, StringComparison.CurrentCultureIgnoreCase)));
 }
开发者ID:teerachail,项目名称:xdailysoccer,代码行数:8,代码来源:GetWinnersSteps.cs

示例14: WhenIFillInTheFollowingFields

 public void WhenIFillInTheFollowingFields(Table table)
 {
     var fields = table.CreateSet<Field>();
     foreach(var field in fields)
     {
         FillIn(field.Value, labelText: field.Name);
     }
 }
开发者ID:michaeljacobdavis,项目名称:Specflow,代码行数:8,代码来源:StepDefinitions.cs

示例15: ThenTheResultShouldBeReturnedAssist

        public void ThenTheResultShouldBeReturnedAssist(Table resultTable)
        {
            Person person = resultTable.CreateSet<Person>().ToList()[0];

            var searchResult = ScenarioContext.Current.Get<List<Person>>(SEARCH_RESULT_KEY);

            searchResult.Should().Contain.Item(person);
        }
开发者ID:ppnrao,项目名称:pickles,代码行数:8,代码来源:TableSteps.cs


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