예제 #1
0
        public void TestInput()
        {
            Calculator1 calc = new Calculator1();
            try 
            {
                int result = calc.Calculate("abcd");
                Assert.Fail();
            }
            catch (InvalidOperationException)
            {

            }
        }
예제 #2
0
 void DoSumTest(string input, int expected)
 {
     Calculator1 calc = new Calculator1();
     int result = calc.Calculate(input);
     Assert.AreEqual(expected, result);
 }
예제 #3
0
 public void JedenplusJeden()
 { 
     Calculator1 calc = new Calculator1();
     int result = calc.Calculate("1+1");
     Assert.AreEqual(2, result);
 }