コード例 #1
0
        public void Creates_WrapperProvider_EnumerableOfTInterface(
            Type declaredType,
            object objectToBeWrapped,
            Type expectedWrappingType)
        {
            // Arrange
            var wrapperProviderFactories         = GetWrapperProviderFactories();
            var enumerableWrapperProviderFactory = new EnumerableWrapperProviderFactory(wrapperProviderFactories);
            var wrapperProviderContext           = new WrapperProviderContext(declaredType, isSerialization: true);

            // Act
            var wrapperProvider = enumerableWrapperProviderFactory.GetProvider(wrapperProviderContext);

            // Assert
            Assert.NotNull(wrapperProvider);
            Assert.Equal(expectedWrappingType, wrapperProvider.WrappingType);
        }