public void Any_Predicate_With_ValidData_Must_Succeed(int[] source, Func <int, bool> predicate) { // Arrange var wrapped = Wrap.AsValueEnumerable(source); var expected = System.Linq.Enumerable.Any(source, predicate); // Act var result = ValueEnumerableExtensions .Any <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, predicate); // Assert _ = result.Must() .BeEqualTo(expected); }
public void Any_PredicateAt_With_Null_Must_Throw() { // Arrange var source = new int[0]; var wrapped = Wrap.AsValueEnumerable(source); var predicate = (PredicateAt <int>)null; // Act Action action = () => _ = ValueEnumerableExtensions .Any <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, predicate); // Assert _ = action.Must() .Throw <ArgumentNullException>() .EvaluateTrue(exception => exception.ParamName == "predicate"); }