public void CalculateIntellisenseTextConverter_Convert_Null_Null()
        {
            var converter = new CalculateIntellisenseTextConverter();
            var actual    = (string)converter.Convert(null, typeof(bool), null, null);

            Assert.AreEqual(null, actual);
        }
        public void CalculateIntellisenseTextConverter_ConvertBack_StringWithParameterAllowUserCalculateIsFalse_StringIsNotConverted()
        {
            var    converter = new CalculateIntellisenseTextConverter();
            string expected  = string.Format("{0}sum(10,10){1}", GlobalConstants.CalculateTextConvertPrefix, GlobalConstants.CalculateTextConvertSuffix);
            var    actual    = (string)converter.ConvertBack(expected, typeof(bool), "False", null);

            Assert.AreEqual(expected, actual);
        }
        public void CalculateIntellisenseTextConverter_ConvertBack_StringWithCalculationConstants_SameString()
        {
            var          converter = new CalculateIntellisenseTextConverter();
            const string Expected  = "sum(10,10)";
            var          actual    = (string)converter.ConvertBack(Expected, typeof(bool), null, null);

            Assert.AreEqual(Expected, actual);
        }
        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);
        }