Beispiel #1
0
        public async ValueTask ContainsAsync_With_Comparer_And_Contains_Must_ReturnTrue(int[] source)
        {
            // Arrange
            var value   = System.Linq.Enumerable.Last(source);
            var wrapped = Wrap.AsAsyncValueEnumerable(source);

            // Act
            var result = await AsyncValueEnumerable
                         .ContainsAsync <Wrap.AsyncValueEnumerable <int>, Wrap.AsyncEnumerator <int>, int>(wrapped, value, EqualityComparer <int> .Default);

            // Assert
            _ = result.Must()
                .BeTrue();
        }
Beispiel #2
0
        public async ValueTask ContainsAsync_With_Null_And_NotContains_Must_ReturnFalse(int[] source)
        {
            // Arrange
            var value   = int.MaxValue;
            var wrapped = Wrap.AsAsyncValueEnumerable(source);

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

            // Assert
            _ = result.Must()
                .BeFalse();
        }