示例#1
0
            public void WithEmptySourceWithComparerReturnsDefault()
            {
                using var strings = Enumerable.Empty <string>().AsTestingSequence();
                var minima = strings.MinBy(s => s.Length, Comparable <int> .DescendingOrderComparer);

                Assert.That(MoreEnumerable.LastOrDefault(minima), Is.Null);
            }
示例#2
0
            public void WithComparerReturnsMinimumPerComparer()
            {
                using var strings = SampleData.Strings.AsTestingSequence();
                var minima = strings.MinBy(s => s.Length, Comparable <int> .DescendingOrderComparer);

                Assert.That(MoreEnumerable.LastOrDefault(minima), Is.EqualTo("world"));
            }
示例#3
0
            public void WithEmptySourceReturnsDefault()
            {
                using var strings = Enumerable.Empty <string>().AsTestingSequence();
                var minima = strings.MinBy(s => s.Length);

                Assert.That(MoreEnumerable.LastOrDefault(minima), Is.Null);
            }
示例#4
0
            public void ReturnsMinimum()
            {
                using var strings = SampleData.Strings.AsTestingSequence();
                var minima = strings.MinBy(s => s.Length);

                Assert.That(MoreEnumerable.LastOrDefault(minima), Is.EqualTo("az"));
            }