// ReSharper disable InconsistentNaming public void ExplorerItemModelToIconConverter_Convert_WithResourceTypeOfMessageNoImageReturned() // ReSharper restore InconsistentNaming { //------------Setup for test-------------------------- var explorerItemModelToIconConverter = new ExplorerItemModelToIconConverter(); //------------Execute Test--------------------------- object convert = explorerItemModelToIconConverter.Convert(new object[] { ResourceType.Message, true }, null, null, null); BitmapImage bitmapImage = convert as BitmapImage; //------------Assert Results------------------------- Assert.IsNull(bitmapImage); }
// ReSharper disable InconsistentNaming public void ExplorerItemModelToIconConverter_Convert_WithResourceTypeOfPluginService_CorrectBitmapImage() // ReSharper restore InconsistentNaming { Uri expected = new Uri("pack://application:,,,/Warewolf Studio;component/Images/PluginService-32.png"); //------------Setup for test-------------------------- var explorerItemModelToIconConverter = new ExplorerItemModelToIconConverter(); //------------Execute Test--------------------------- object convert = explorerItemModelToIconConverter.Convert(new object[] { ResourceType.PluginService, false }, null, null, null); BitmapImage bitmapImage = convert as BitmapImage; //------------Assert Results------------------------- if (bitmapImage != null) { Assert.AreEqual(expected, bitmapImage.UriSource); } else { Assert.Fail("No BitmapImage was returned."); } }