コード例 #1
0
ファイル: 12DecimalToTest.cs プロジェクト: usausa/Work-Net
        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));
        }