示例#1
0
        public void Constructor_ExpectedValues()
        {
            // Call
            var converter = new IconToImageSourceConverter();

            // Assert
            Assert.IsInstanceOf <IValueConverter>(converter);
        }
示例#2
0
        public void ConvertBack_Always_ThrowsNotSupportedException()
        {
            // Setup
            var converter = new IconToImageSourceConverter();

            // Call
            void Call() => converter.ConvertBack(null, null, null, null);

            // Assert
            Assert.Throws <NotSupportedException>(Call);
        }
示例#3
0
        public void Convert_ValidIcon_ReturnsImageSource()
        {
            // Setup
            var converter = new IconToImageSourceConverter();

            // Call
            object imageSource = converter.Convert(Resources.warning, null, null, null);

            // Assert
            Assert.IsInstanceOf <ImageSource>(imageSource);
        }