本文整理汇总了C#中TechTalk.SpecFlow.Table.CreateDynamicSet方法的典型用法代码示例。如果您正苦于以下问题:C# Table.CreateDynamicSet方法的具体用法?C# Table.CreateDynamicSet怎么用?C# Table.CreateDynamicSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TechTalk.SpecFlow.Table
的用法示例。
在下文中一共展示了Table.CreateDynamicSet方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GivenIHaveTheFollowingItems
public void GivenIHaveTheFollowingItems(Table table)
{
var items = table.CreateDynamicSet().ToList();
foreach (dynamic item in items)
{
_checkoutTill.ScanItem((string)item.Sku);
}
}
示例2: foreach
public void ƒопустим«аданајктивностьѕользователей(Table table)
{
var session = RavenDb.CurrentStorageSession;
foreach (var row in table.CreateDynamicSet())
{
string username = row.им¤;
var user = session.Query<UserEntity>().Single(u => u.Username == username);
user.LastActivityDate = (DateTime)row.активность;
session.Save(user);
}
}
示例3: ThenTheFollowingWillBeOutput
public void ThenTheFollowingWillBeOutput(Table table)
{
var expectedItems = table.CreateDynamicSet().ToList();
var actualItems = ScenarioContext.Current.Get<IList<ReceiptItem>>("Receptitems");
for (var i = 0; i < expectedItems.Count; i++)
{
Assert.That(actualItems[i].Desc, Is.EqualTo(expectedItems[i].Desc));
Assert.That(actualItems[i].Price, Is.EqualTo(expectedItems[i].Price));
Assert.That(actualItems[i].Sku, Is.EqualTo(expectedItems[i].Sku));
}
}
示例4: WithMethodBinding
public void WithMethodBinding(string valueType, Table table)
{
switch (valueType)
{
case "string":
State.OriginalSet = table.CreateDynamicSet<string>().ToList();
break;
case "int":
State.OriginalSet = table.CreateDynamicSet<int>().ToList();
break;
case "double":
State.OriginalSet = table.CreateDynamicSet<double>().ToList();
break;
case "DateTime":
State.OriginalSet = table.CreateDynamicSet<DateTime>().ToList();
break;
case "bool":
State.OriginalSet = table.CreateDynamicSet<bool>().ToList();
break;
default:
throw new ApplicationException("Unhandled value type");
}
}
示例5: ThenTheFollowingFieldsShouldBeHiglightedIn
public void ThenTheFollowingFieldsShouldBeHiglightedIn(Constants.Colour colour, Table expectedFields)
{
var expectedRgbaColour = Utilities.GetRgbaColour(colour);
var expectedFieldList = expectedFields.CreateDynamicSet();
foreach (var fieldItem in expectedFieldList)
{
var convertedEnumField =
(Constants.LoginFields) Enum.Parse(typeof (Constants.LoginFields), fieldItem.Field, true);
var actualColour = LoginPage.GetValidationFieldColour(convertedEnumField);
Assert.AreEqual(expectedRgbaColour, actualColour);
}
}
示例6: GivenTheFollowingPricingRules
public void GivenTheFollowingPricingRules(Table table)
{
var pricingRules = new PricingRules();
var rules = table.CreateDynamicSet().ToList();
foreach (dynamic rule in rules)
{
int totalQualify;
if (rule.TotalQualify is Int32)
{
totalQualify = rule.TotalQualify;
}
else
{
totalQualify = 0;
}
pricingRules.AddRule((string)rule.Sku, (Decimal)rule.Price, (string)rule.Rule, totalQualify);
}
_checkoutTill = new CheckoutTill(pricingRules, this);
}
示例7: WithMethodBInding
public void WithMethodBInding(Table table)
{
State.OriginalSet = table.CreateDynamicSet().ToList();
}
示例8: TransformToList
public IList<object> TransformToList(Table table)
{
return table.CreateDynamicSet().ToList<object>();
}
示例9: TransformToEnumerable
public IEnumerable<object> TransformToEnumerable(Table table)
{
return table.CreateDynamicSet();
}