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

            Assert.Equal(ManualConverter.Int16ToByte(0), converter(0));
            Assert.Equal(ManualConverter.Int16ToByte(1), converter(1));
            Assert.Equal(ManualConverter.Int16ToByte(-1), converter(-1));
            Assert.Equal(ManualConverter.Int16ToByte(Int16.MinValue), converter(Int16.MinValue));
            Assert.Equal(ManualConverter.Int16ToByte(Int16.MaxValue), converter(Int16.MaxValue));
        }