public void CannotConvertNotNullableTypeToNotNullableType() { var converterChooserMock = new Mock <ISettingsConverterChooser>(); var converter = new NullableConverter(converterChooserMock.Object); var canConvert = converter.CanConvert(typeof(object), typeof(int)); Assert.IsFalse(canConvert); }
public void CanConvertNullableTypeToWhateverType() { var converterChooserMock = new Mock <ISettingsConverterChooser>(); var converter = new NullableConverter(converterChooserMock.Object); var canConvert = converter.CanConvert(typeof(double?), typeof(object)); Assert.IsTrue(canConvert); }