Пример #1
0
        public void Contains_ReferenceType_With_Null_And_Contains_Must_ReturnTrue(int[] source)
        {
            // Arrange
            var value   = Enumerable.Last(source).ToString();
            var wrapped = Wrap.AsValueEnumerable(source.Select(item => item.ToString()).ToArray());

            // Act
            var result = ValueEnumerableExtensions
                         .Contains <Wrap.ValueEnumerableWrapper <string>, Wrap.Enumerator <string>, string>(wrapped, value);

            // Assert
            _ = result.Must()
                .BeTrue();
        }
Пример #2
0
        public void Contains_With_DefaultComparer_And_NotContains_Must_ReturnFalse(int[] source)
        {
            // Arrange
            var value   = int.MaxValue;
            var wrapped = Wrap.AsValueEnumerable(source);

            // Act
            var result = ValueEnumerableExtensions
                         .Contains <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, value, EqualityComparer <int> .Default);

            // Assert
            _ = result.Must()
                .BeFalse();
        }
Пример #3
0
        public void Contains_ValueType_With_Null_And_Contains_Must_ReturnTrue(int[] source)
        {
            // Arrange
            var value   = Enumerable.Last(source);
            var wrapped = Wrap.AsValueEnumerable(source);

            // Act
            var result = ValueEnumerableExtensions
                         .Contains <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, value);

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