Beispiel #1
0
        public void InvertsOtherConverter()
        {
            IValueConverter normalConverter    = new IntToStringConverter();
            var             invertingConverter = new InvertingConverter(normalConverter);

            const int    convertValue     = 123;
            const string convertBackValue = "123";

            Assert.Equal(
                normalConverter.Convert(convertValue, typeof(string), null, null),
                invertingConverter.ConvertBack(convertValue, typeof(string), null, null));
            Assert.Equal(
                normalConverter.ConvertBack(convertBackValue, typeof(string), null, null),
                invertingConverter.Convert(convertBackValue, typeof(string), null, null));
        }