public void testInnerElementMethod1() { ///1st passing test string input = "(1+2)"; //should return 1+2 SOtests.Solution methodTOtest = new SOtests.Solution(); var output = methodTOtest.InnerElement(input); Assert.IsTrue(output == "1+2"); }
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"); }
public void TestWhileEvaluation1() { ///1st passing test string input = "345"; //should return 1+2 SOtests.Solution methodTOtest = new SOtests.Solution(); var output = methodTOtest.WhileEvaluation(input); Assert.IsTrue(!output); }
public void TestCreateUnitElement3() { ///1st passing test string input = "2+18/2+1*3"; //should return 1+2 SOtests.Solution methodTOtest = new SOtests.Solution(); var output = methodTOtest.CreateUnitElement(input); Assert.IsTrue(output == "14"); }
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"); }