static void Main() { ReversePolishNotation rpn = new ReversePolishNotation(); List<Tuple<string[], int>> testInputs = new List<Tuple<string[], int>>(); testInputs.Add(Tuple.Create(new string[] {"2", "1", "+", "3", "*"}, 9)); testInputs.Add(Tuple.Create(new string[] {"4", "13", "5", "/", "+"}, 6)); foreach (var input in testInputs) { if (rpn.Solve(input.Item1) != input.Item2) { WriteLine("Tests failed for {0}!", input.Item2); return; } } WriteLine("Tests passed!"); }