public void TestThatUnsupportedFormatHasDefaultColor() { var converter = new FileExtensionToColorConverter(); var typed = GetTypedColor(".abc"); Assert.Equal(FileExtensionToColorConverter.UnknownBrush, typed); }
private static SolidColorBrush GetTypedColor(string ext) { var converter = new FileExtensionToColorConverter(); object value = converter.Convert(ext, typeof(int), null, CultureInfo.CurrentCulture); Assert.IsType <SolidColorBrush>(value); return(value as SolidColorBrush); }