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


C# Table.FindAllInSet方法代码示例

本文整理汇总了C#中Table.FindAllInSet方法的典型用法代码示例。如果您正苦于以下问题:C# Table.FindAllInSet方法的具体用法?C# Table.FindAllInSet怎么用?C# Table.FindAllInSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table.FindAllInSet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Returns_nothing_if_the_match_cannot_be_found

        public void Returns_nothing_if_the_match_cannot_be_found()
        {
            var table = new Table("Field", "Value");
            table.AddRow("What You Talkin Bout", "Willis");

            table.FindAllInSet(testSet).Count().Should().Be(0);
        }
开发者ID:tmulkern,项目名称:SpecFlow,代码行数:7,代码来源:FindAllInSetExtensionMethodsTests.cs

示例2: It_returns_nothing_when_no_match_could_be_found

        public void It_returns_nothing_when_no_match_could_be_found()
        {
            var table = new Table("Field", "Value");
            table.AddRow("String Property", "Peter Keating");

            table.FindAllInSet(testSet).Count().Should().Be(0);
        }
开发者ID:tmulkern,项目名称:SpecFlow,代码行数:7,代码来源:FindAllInSetExtensionMethodsTests.cs

示例3: Returns_match_on_partial_match

        public void Returns_match_on_partial_match()
        {
            var table = new Table("Field", "Value");
            table.AddRow("Int Property", "20");

            var results = table.FindAllInSet(testSet);

            results.Count().Should().Be(1);
            results.First().IntProperty.Should().Be(20);
        }
开发者ID:tmulkern,项目名称:SpecFlow,代码行数:10,代码来源:FindAllInSetExtensionMethodsTests.cs

示例4: It_should_return_multiple_matches_if_they_can_be_Found

        public void It_should_return_multiple_matches_if_they_can_be_Found()
        {
            var john = new Person {FirstName = "John", LastName = "Doe"};
            var jane = new Person {FirstName = "Jane", LastName = "Doe"};
            var records = new List<Person> { john, jane};

            var table = new Table("Field", "Value");
            table.AddRow("LastName", "Doe");

            var results = table.FindAllInSet(records);
            results.Count().Should().Be(2);
            results.Should().Contain(john);
            results.Should().Contain(jane);
        }
开发者ID:tmulkern,项目名称:SpecFlow,代码行数:14,代码来源:FindAllInSetExtensionMethodsTests.cs

示例5: Usage_example

        public void Usage_example()
        {
            var john = new Person {FirstName = "John", LastName = "Doe"};
            var jane = new Person {FirstName = "Jane", LastName = "Doe"};
            var records = new List<Person> {john, jane};

            Table table;
            table = new Table("Field", "Value");
            table.AddRow("FirstName", "John");

            table.FindAllInSet(records).Count().Should().Be(1);
            table.FindAllInSet(records).Should().Contain(john);

            table = new Table("Field", "Value");
            table.AddRow("LastName", "Doe");

            table.FindAllInSet(records).Count().Should().Be(2);
            table.FindAllInSet(records).Should().Contain(john);
            table.FindAllInSet(records).Should().Contain(jane);

            table = new Table("Field", "Value");
            table.AddRow("LastName", "Trump");

            table.FindAllInSet(records).Count().Should().Be(0);
        }
开发者ID:tmulkern,项目名称:SpecFlow,代码行数:25,代码来源:FindAllInSetExtensionMethodsTests.cs


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