public void Empty() { var enumerable = ValueEnumerable.Empty <int>(); Assert.AreEqual(0, enumerable.Count); Assert.AreEqual(0, enumerable.Count()); }
public int Hyperlinq_Empty() { var sum = 0; foreach (var item in ValueEnumerable.Empty <int>()) { sum += item; } return(sum); }
public int Hyperlinq_Empty_Select_ForEach() { var sum = 0; foreach (var item in ValueEnumerable.Empty <int>().Select(item => item)) { sum += item; } return(sum); }
public int Hyperlinq_Empty_Where_ForEach() { var sum = 0; foreach (var item in ValueEnumerable.Empty <int>().Where(item => (item & 0x01) == 0)) { sum += item; } return(sum); }
public int Hyperlinq_Empty_Select_For() { var source = ValueEnumerable.Empty <int>().Select(item => item); var sum = 0; for (var index = 0; index < source.Count(); index++) { sum += source[index]; } return(sum); }
public void Empty_Must_Succeed() { // Arrange var expected = Enumerable.Empty <int>(); // Act var result = ValueEnumerable.Empty <int>(); // Assert _ = result.Must() .BeEnumerableOf <int>() .BeEqualTo(expected); }
public int Hyperlinq_Empty_Count() => ValueEnumerable.Empty <int>().Count();