public void ToUInt16() { var converter = ConverterFactory.Create <double, ushort>(); Assert.Equal(ManualConverter.DoubleToUInt16(0d), converter(0d)); Assert.Equal(ManualConverter.DoubleToUInt16(1d), converter(1d)); Assert.Equal(ManualConverter.DoubleToUInt16(-1d), converter(-1d)); Assert.Equal(ManualConverter.DoubleToUInt16(Double.MinValue), converter(Double.MinValue)); Assert.Equal(ManualConverter.DoubleToUInt16(Double.MaxValue), converter(Double.MaxValue)); }