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