當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。