Beispiel #1
0
        public void ToByte()
        {
            var converter = ConverterFactory.Create <double, byte>();

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