Beispiel #1
0
        public void ConvertTest4()
        {
            CalculatorConverter converter = new CalculatorConverter();
            List <string>       input     = new List <string> {
                "-", "5", "+", "6"
            };
            var           actualResult   = converter.Convert(input);
            List <string> expectedResult = new List <string> {
                "0", "5", "-", "6", "+"
            };

            CollectionAssert.AreEqual(expectedResult, actualResult);
        }
Beispiel #2
0
        public void ConvertTest2()
        {
            CalculatorConverter converter = new CalculatorConverter();
            List <string>       input     = new List <string> {
                "(", "3.8", "-", "6.77", ")", "*", "(", "2.8", "+", "1", ")"
            };
            var           actualResult   = converter.Convert(input);
            List <string> expectedResult = new List <string> {
                "3.8", "6.77", "-", "2.8", "1", "+", "*"
            };

            CollectionAssert.AreEqual(expectedResult, actualResult);
        }