public void SingleOrDefaultAsync_With_Multiple_Must_Throw(int[] source)
        {
            // Arrange
            var wrapped = Wrap
                          .AsAsyncValueEnumerable(source);

            // Act
            Func <ValueTask> action = async() => _ = await AsyncValueEnumerable
                                                     .SingleOrDefaultAsync <Wrap.AsyncValueEnumerable <int>, Wrap.AsyncEnumerator <int>, int>(wrapped);

            // Assert
            _ = action.Must()
                .Throw <InvalidOperationException>()
                .EvaluateTrue(exception => exception.Message == "Sequence contains more than one element");
        }
        public async ValueTask SingleOrDefaultAsync_With_EmptyOrSingle_Must_Succeed(int[] source)
        {
            // Arrange
            var wrapped = Wrap
                          .AsAsyncValueEnumerable(source);
            var expected =
                System.Linq.Enumerable.SingleOrDefault(source);

            // Act
            var result = await AsyncValueEnumerable
                         .SingleOrDefaultAsync <Wrap.AsyncValueEnumerable <int>, Wrap.AsyncEnumerator <int>, int>(wrapped);

            // Assert
            _ = result.Must()
                .BeEqualTo(expected);
        }