Пример #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);
 }