よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public void ToInt16() { var converter = ConverterFactory.Create <double, short>(); Assert.Equal(ManualConverter.DoubleToInt16(0d), converter(0d)); Assert.Equal(ManualConverter.DoubleToInt16(1d), converter(1d)); Assert.Equal(ManualConverter.DoubleToInt16(-1d), converter(-1d)); Assert.Equal(ManualConverter.DoubleToInt16(Double.MinValue), converter(Double.MinValue)); Assert.Equal(ManualConverter.DoubleToInt16(Double.MaxValue), converter(Double.MaxValue)); }