public void StringToObjectConverter_ConvertWithBadInput_Test() { IValueConverter target = new StringToObjectConverter { TypeConverterType = typeof(BrushConverter) }; var result = target.Convert("NoABrushName", null, null, null); Assert.AreEqual(DependencyProperty.UnsetValue, result); }
public void StringToObjectConverter_ConvertWithExplicitAndImplicitTargetType_Test() { IValueConverter target = new StringToObjectConverter { TypeConverterType = typeof(BrushConverter) }; var result = target.Convert("Blue", typeof(Color), null, null); Assert.AreEqual(Brushes.Blue, result); }