Convert() публичный Метод

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType System.Type
parameter object
culture System.Globalization.CultureInfo
Результат object
 public void CalculateIntellisenseTextConverter_Convert_StringWithParameterAllowUserCalculateIsTrue_StringIsConverted()
 {
     var converter = new CalculateIntellisenseTextConverter();
      string inputText = string.Format("{0}sum(10,10){1}", GlobalConstants.CalculateTextConvertPrefix, GlobalConstants.CalculateTextConvertSuffix);
      var actual = (string)converter.Convert(inputText, typeof(bool), "True", null);
     Assert.AreEqual("=sum(10,10)", actual);
 }
 public void CalculateIntellisenseTextConverter_Convert_StringWithParameterAllowUserCalculateIsFalse_StringIsNotConverted()
 {
     var converter = new CalculateIntellisenseTextConverter();
     string expected = string.Format("{0}sum(10,10){1}", GlobalConstants.CalculateTextConvertPrefix, GlobalConstants.CalculateTextConvertSuffix);
     var actual = (string)converter.Convert(expected, typeof(bool), "False", null);
     Assert.AreEqual(expected, actual);
 }
 public void CalculateIntellisenseTextConverter_Convert_StringWithCalculationConstants_SameString()
 {
     var converter = new CalculateIntellisenseTextConverter();
     const string Expected = "sum(10,10)";
     var actual = (string)converter.Convert(Expected, typeof(bool), null, null);
     Assert.AreEqual(Expected, actual);
 }
 public void CalculateIntellisenseTextConverter_Convert_Null_Null()
 {
     var converter = new CalculateIntellisenseTextConverter();
     var actual = (string)converter.Convert(null, typeof(bool), null, null);
     Assert.AreEqual(null, actual);
 }