Пример #1
0
            public void SortedEnumerable_Contains_WithInvalidItemValue_DoesNotFindItem()
            {
                IEnumerable <string>       source = new[] { "a", "b", "c" };
                ISortedEnumerable <string> sorted = source.AsSorted();
                bool result = sorted.Contains("0");

                Assert.IsFalse(result, "Item should not be found.");
            }
Пример #2
0
            public void SortedEnumerable_Contains_WithInvalidItem_DoesNotFindItem()
            {
                IEnumerable <string>       source = new[] { "a", "b", "c" };
                ISortedEnumerable <string> sorted = source.AsSorted();
                bool result = sorted.Contains(x => StringComparer.InvariantCultureIgnoreCase.Compare("0", x));

                Assert.IsFalse(result, "Item should not be found.");
            }
Пример #3
0
            public void SortedEnumerable_Contains_WithValidItemValue_FindsItem()
            {
                IEnumerable <string>       source = new[] { "a", "b", "c" };
                ISortedEnumerable <string> sorted = source.AsSorted();
                bool result = sorted.Contains("b");

                Assert.IsTrue(result, "Item should be found.");
            }