Esempio n. 1
0
        public void TestCalculator2()
        {
            ///1st passing test
            string input = "(2+8)/2+1*3";

            //should return 1+2
            SOtests.Solution methodTOtest = new SOtests.Solution();
            var output = methodTOtest.CalculatorParser(input);

            Assert.IsTrue(output == "8");
        }
Esempio n. 2
0
        public void TestCalculator6()
        {
            ///1st passing test
            string input = "(6)-(8)-(7)+(1+(6))";

            //should return 1+2
            SOtests.Solution methodTOtest = new SOtests.Solution();
            var output = methodTOtest.CalculatorParser(input);

            Assert.IsTrue(output == "-2");
        }