示例#1
0
        public void ParseTest(string input, string output)
        {
            var    calc   = new Calculator();
            string parsed = "";
            string exc    = "";

            try
            {
                parsed = calc.Parse(input).ToString();
            }
            catch (Exception e)
            {
                exc = e.Message;
            }
            finally
            {
                if (exc != "")
                {
                    parsed = exc;
                }
            }

            Assert.AreEqual(parsed, output);
        }