public void TestInput() { Calculator1 calc = new Calculator1(); try { int result = calc.Calculate("abcd"); Assert.Fail(); } catch (InvalidOperationException) { } }
void DoSumTest(string input, int expected) { Calculator1 calc = new Calculator1(); int result = calc.Calculate(input); Assert.AreEqual(expected, result); }
public void JedenplusJeden() { Calculator1 calc = new Calculator1(); int result = calc.Calculate("1+1"); Assert.AreEqual(2, result); }