Example #1
0
        public void TestThatUnsupportedFormatHasDefaultColor()
        {
            var converter = new FileExtensionToColorConverter();
            var typed     = GetTypedColor(".abc");

            Assert.Equal(FileExtensionToColorConverter.UnknownBrush, typed);
        }
Example #2
0
        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);
        }