コード例 #1
0
        public void ToUInt32()
        {
            var converter = ConverterFactory.Create <double, uint>();

            Assert.Equal(ManualConverter.DoubleToUInt32(0d), converter(0d));
            Assert.Equal(ManualConverter.DoubleToUInt32(1d), converter(1d));
            Assert.Equal(ManualConverter.DoubleToUInt32(-1d), converter(-1d));
            Assert.Equal(ManualConverter.DoubleToUInt32(Double.MinValue), converter(Double.MinValue));
            Assert.Equal(ManualConverter.DoubleToUInt32(Double.MaxValue), converter(Double.MaxValue));
        }