示例#1
0
        public void AsValueEnumerable_With_ValueType_Must_ReturnCopy()
        {
            // Arrange
            var source  = new int[0];
            var wrapped = Wrap.AsValueEnumerable(source);

            // Act
            var result = ValueEnumerable
                         .AsValueEnumerable <Wrap.ValueEnumerable <int>, Wrap.Enumerator <int>, int>(wrapped);

            // Assert
            _ = result.Must()
                .BeEqualTo(wrapped);
        }
示例#2
0
        public void AsValueEnumerable_With_ReferenceType_Must_ReturnSame()
        {
            // Arrange
            var source  = new int[0];
            var wrapped = Wrap
                          .AsValueEnumerable(source) as IValueEnumerable <int, Wrap.Enumerator <int> >;

            // Act
            var result = ValueEnumerable
                         .AsValueEnumerable <IValueEnumerable <int, Wrap.Enumerator <int> >, Wrap.Enumerator <int>, int>(wrapped);

            // Assert
            _ = result.Must()
                .BeSameAs(wrapped);
        }