public void Int32ConverterActivation()
            {
                // Arrange
                var expected = typeof (Int32Converter);
                var converterAttribute = new ConverterAttribute(expected);

                // Act
                var actual = converterAttribute.BuildConverter();

                // Assert
                Assert.NotNull(actual);
                Assert.IsType<Int32Converter>(actual);
            }
Exemplo n.º 2
0
        internal static IConverter BuildConverter(this ConverterAttribute source)
        {
            Guard.NotNull(source, nameof(source));

            return(Activator.CreateInstance(source.ConverterType) as IConverter);
        }