本文整理汇总了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);
}
示例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);
}
示例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;
}
示例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);
}
示例5: GivenADefaultSetOfWhingers
public void GivenADefaultSetOfWhingers(Table table)
{
foreach (var item in table.CreateSet<WhingerEntity>())
{
WhingePoolApplicationContext.WhingersTable.EnsureInstance(item);
}
}
示例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);
}
示例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");
}
示例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;
}
示例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);
}
}
示例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()));
}
示例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);
}
示例12: GivenThereIsATestWithTheFollowingTestItems
public void GivenThereIsATestWithTheFollowingTestItems(Table table)
{
var itemList = table.CreateSet<TestItem>();
var test = new Test(itemList);
ScenarioContext.Current.Add(testKey, test);
}
示例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)));
}
示例14: WhenIFillInTheFollowingFields
public void WhenIFillInTheFollowingFields(Table table)
{
var fields = table.CreateSet<Field>();
foreach(var field in fields)
{
FillIn(field.Value, labelText: field.Name);
}
}
示例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);
}