Example #1
0
        public void ToUInt64()
        {
            var converter = ConverterFactory.Create <double, ulong>();

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