public void ProvideValue_returns_instance()
        {
            var converter     = new BoolToInverseBoolConverter();
            var providedValue = converter.ProvideValue(null);

            Assert.IsType <BoolToInverseBoolConverter>(providedValue);
        }
        public void ConvertBack(object input, Type targetType, object parameter, string cultureString, object expectedOutput)
        {
            var converter = new BoolToInverseBoolConverter();
            var culture   = new CultureInfo(cultureString);
            var output    = converter.ConvertBack(input, targetType, parameter, culture);

            Assert.Equal(expectedOutput, output);
        }
        public void Convert_returns_DependencyPropertyUnsetValue_when_value_null()
        {
            var converter = new BoolToInverseBoolConverter();
            var culture   = new CultureInfo("en-US");

#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
            var output = converter.Convert(null, typeof(bool), null, culture);
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
            Assert.Equal(DependencyProperty.UnsetValue, output);
        }
Exemple #4
0
 public void InitializeConverter()
 {
     _converter = new BoolToInverseBoolConverter();
 }