Convert() public method

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType System.Type
parameter object
culture System.Globalization.CultureInfo
return object
        public void ConvertAsteriskExpectedSystemAsterisk()
        {
            MessageBoxImageToSystemIconConverter messageBoxImageToSystemIconConverter = new MessageBoxImageToSystemIconConverter();
            string actual = messageBoxImageToSystemIconConverter.Convert(MessageBoxImage.Asterisk, null, null, null) as string;

            Assert.AreEqual("pack://application:,,,/Warewolf Studio;component/Images/PopupInformation-32.png", actual);
        }
        public void ConvertHandExpectedSystemHand()
        {
            MessageBoxImageToSystemIconConverter messageBoxImageToSystemIconConverter = new MessageBoxImageToSystemIconConverter();

            string actual = messageBoxImageToSystemIconConverter.Convert(MessageBoxImage.Hand, null, null, null) as string;

            Assert.AreEqual("pack://application:,,,/Warewolf Studio;component/Images/PopupError-32.png", actual);
        }
        public void ConvertExclamationExpectedSystemExclamation()
        {
            MessageBoxImageToSystemIconConverter messageBoxImageToSystemIconConverter = new MessageBoxImageToSystemIconConverter();

            string actual = messageBoxImageToSystemIconConverter.Convert(MessageBoxImage.Exclamation, null, null, null) as string;

            Assert.AreEqual("pack://application:,,,/Warewolf Studio;component/Images/PopupNotSavedWarning-32.png", actual);
        }
        public void ConvertInvalidValueExpectedEmptyBitmap()
        {
            MessageBoxImageToSystemIconConverter messageBoxImageToSystemIconConverter = new MessageBoxImageToSystemIconConverter();
            BitmapSource actual = messageBoxImageToSystemIconConverter.Convert("", null, null, null) as BitmapSource;

            Color actualColor = GetPixel(actual);
            Color expectedColor = Color.FromArgb(0, 0, 0, 0);

            if(actual != null)
            {
                Assert.AreEqual(1, actual.PixelHeight, "Returned image should be a height of 1.");
                Assert.AreEqual(1, actual.PixelWidth, "Returned image should be a width of 1.");
            }
            Assert.AreEqual(expectedColor, actualColor, "Returned image isn't empty.");
        }
        public void ConvertQuestionExpectedSystemQuestion()
        {
            MessageBoxImageToSystemIconConverter messageBoxImageToSystemIconConverter = new MessageBoxImageToSystemIconConverter();

            string actual = messageBoxImageToSystemIconConverter.Convert(MessageBoxImage.Question, null, null, null) as string;

            Assert.AreEqual("pack://application:,,,/Warewolf Studio;component/Images/GenericHelp-32.png", actual);
        }