Exemple #1
0
        public void ToInt64()
        {
            var converter = ConverterFactory.Create <double, long>();

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