コード例 #1
0
 public void DoesNotIterateForCount()
 {
     IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(5);
     IOrderedEnumerableWithCount<int> orderBy = throwingEnumerable.OrderBy(x => x);
     IOrderedEnumerableWithCount<int> result = orderBy.ThenBy(x => x);
     Assert.AreEqual(5, result.Count);
 }
コード例 #2
0
 public void ExecutionIsDeferred()
 {
     IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(0);
     IOrderedEnumerableWithCount<int> orderBy = throwingEnumerable.OrderBy(x => x);
     IOrderedEnumerableWithCount<int> result = orderBy.ThenBy(x => x);
 }
コード例 #3
0
 public void ExecutionIsDeferred()
 {
     IEnumerableWithCount<int> throwingEnumerable = new ThrowingEnumerable(0);
     throwingEnumerable.OrderBy(x => x);
 }
コード例 #4
0
 public void DoesNotIterateForCount()
 {
     IEnumerableWithCount<int> source = new ThrowingEnumerable(3);
     IEnumerableWithCount<int> result = source.OrderBy(x => x);
     Assert.AreEqual(3, result.Count);
 }