public FatValueType Hyperlinq() { var sum = default(FatValueType); foreach (var item in ListBindings.Distinct(source)) { sum += item; } return(sum); }
public int Hyperlinq() { var sum = 0; foreach (var item in ListBindings.Distinct(source)) { sum += item; } return(sum); }
public void Distinct_With_ValidData_Must_Succeed(int[] source) { // Arrange var list = source.ToList(); var expected = Enumerable .Distinct(source); // Act var result = ListBindings .Distinct(list); // Assert _ = result.Must() .BeEnumerableOf <int>() .BeEqualTo(expected, testRefStructs: false, testRefReturns: false); _ = result.SequenceEqual(expected).Must().BeTrue(); }