コード例 #1
0
ファイル: 04Int16ToTest.cs プロジェクト: usausa/Work-Net
        public void ToUInt16()
        {
            var converter = ConverterFactory.Create <short, ushort>();

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