public void ProvideValue_returns_instance() { var converter = new ICollectionNullOrEmptyToInverseVisibilityConverter(); var providedValue = converter.ProvideValue(null); Assert.IsType <ICollectionNullOrEmptyToInverseVisibilityConverter>(providedValue); }
public void ConvertBack_throws_NotSupportedException() { var converter = new ICollectionNullOrEmptyToInverseVisibilityConverter(); var culture = new CultureInfo("en-US"); Assert.Throws <NotSupportedException>(() => converter.ConvertBack(Visibility.Visible, typeof(ICollection), null, culture)); }
public void Convert_returns_DependencyPropertyUnsetValue_when_value_is_not_ICollection() { var converter = new ICollectionNullOrEmptyToInverseVisibilityConverter(); var culture = new CultureInfo("en-US"); var output = converter.Convert(true, typeof(Visibility), null, culture); Assert.Equal(DependencyProperty.UnsetValue, output); }
public void Convert(object input, Type targetType, object parameter, string cultureString, object expectedOutput) { var converter = new ICollectionNullOrEmptyToInverseVisibilityConverter(); var culture = new CultureInfo(cultureString); var output = converter.Convert(input, targetType, parameter, culture); Assert.Equal(expectedOutput, output); }