public void ThenTheResultShouldBeOnTheScreen(int p0)
 {
     RPNCalculator calc = new RPNCalculator();
     int result = calc.MyCalc(expr);
     Assert.AreEqual(8, result);
     //ScenarioContext.Current.Pending();
 }
Beispiel #2
0
        public void MyCalcTest()
        {
            try
            {
                RPNCalculator calc = new RPNCalculator();
                int result = calc.MyCalc(" ");
                Assert.Fail();
            }

            catch(Exception ex)
            {
                Assert.AreEqual("Invalid Exp", ex.Message);
            }
        }