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


C# Table.CreateDynamicSet方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:whitesidem,项目名称:ShoppingWithFuncs,代码行数:8,代码来源:ShoppingListSteps.cs

示例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);
     }
 }
开发者ID:fr4gles,项目名称:Building-Blocks,代码行数:11,代码来源:UsersStorageSteps.cs

示例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));
     }
 }
开发者ID:whitesidem,项目名称:ShoppingWithFuncs,代码行数:11,代码来源:ShoppingListSteps.cs

示例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");
     }
 }
开发者ID:Lumirris,项目名称:SpecFlow.Assist.Dynamic,代码行数:23,代码来源:DynamicSetCreationSteps.cs

示例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);
            }
        }
开发者ID:rohanbaraskar,项目名称:SeleniumAutomationFramework,代码行数:14,代码来源:LoginStepDefinition.cs

示例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);
        }
开发者ID:whitesidem,项目名称:ShoppingWithFuncs,代码行数:21,代码来源:ShoppingListSteps.cs

示例7: WithMethodBInding

 public void WithMethodBInding(Table table)
 {
     State.OriginalSet = table.CreateDynamicSet().ToList();   
 }
开发者ID:hemssam,项目名称:SpecFlow.Assist.Dynamic,代码行数:4,代码来源:DynamicSetCreationSteps.cs

示例8: TransformToList

 public IList<object> TransformToList(Table table)
 {
     return table.CreateDynamicSet().ToList<object>();
 }
开发者ID:TJDekker,项目名称:SpecFlow.Assist.Dynamic,代码行数:4,代码来源:DynamicStepArgumentTransformations.cs

示例9: TransformToEnumerable

 public IEnumerable<object> TransformToEnumerable(Table table)
 {
     return table.CreateDynamicSet();
 }
开发者ID:TJDekker,项目名称:SpecFlow.Assist.Dynamic,代码行数:4,代码来源:DynamicStepArgumentTransformations.cs


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