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)); }
public void ConvertBack_Conversion_AreEqual(int properOutput, string text) { int convertedBack = (int)intToStringConverter.ConvertBack(text, typeof(int), null, System.Globalization.CultureInfo.InvariantCulture); Assert.AreEqual(properOutput, convertedBack); }