An IValueConverter which converts a string value to a Visibility value.
Inheritance: IValueConverter
        public void ConvertWithNonEmptyStringReturnsVisible()
        {
            var converter = new StringToVisibilityConverter();

            var value = converter.Convert(NonEmptyTestString, typeof(Visibility), null, CultureInfo.CurrentCulture);

            Assert.AreEqual(value, Visibility.Visible);
        }
        public void ConvertWithNullReturnsCollapsed()
        {
            var converter = new StringToVisibilityConverter();

            var value = converter.Convert(null, typeof(Visibility), null, CultureInfo.CurrentCulture);

            Assert.AreEqual(value, Visibility.Collapsed);
        }
        public void ConvertBackIsNotImplemented()
        {
            var converter = new StringToVisibilityConverter();

            Assert.ThrowsException<NotSupportedException>(() => converter.ConvertBack(Visibility.Visible, typeof(string), null, CultureInfo.CurrentCulture));
        }