Exemplo n.º 1
0
        public void Convert_returns_DependencyPropertyUnsetValue_when_value_is_not_string()
        {
            var converter = new StringNullOrEmptyToInverseBoolConverter();
            var culture   = new CultureInfo("en-US");
            var output    = converter.Convert(true, typeof(bool), null, culture);

            Assert.Equal(DependencyProperty.UnsetValue, output);
        }
Exemplo n.º 2
0
        public void Convert(object input, Type targetType, object parameter, string cultureString, object expectedOutput)
        {
            var converter = new StringNullOrEmptyToInverseBoolConverter();
            var culture   = new CultureInfo(cultureString);
            var output    = converter.Convert(input, targetType, parameter, culture);

            Assert.Equal(expectedOutput, output);
        }