Exemplo n.º 1
0
        public void ToSingle()
        {
            var converter = ConverterFactory.Create <decimal, float>();

            Assert.Equal(ManualConverter.DecimalToSingle(0m), converter(0m));
            Assert.Equal(ManualConverter.DecimalToSingle(1m), converter(1m));
            Assert.Equal(ManualConverter.DecimalToSingle(-1m), converter(-1m));
            Assert.Equal(ManualConverter.DecimalToSingle(Decimal.MinValue), converter(Decimal.MinValue));
            Assert.Equal(ManualConverter.DecimalToSingle(Decimal.MinValue), converter(Decimal.MinValue));
        }