public void TestAdd() { First target = new First(); // TODO: Initialize to an appropriate value int a = 2; // TODO: Initialize to an appropriate value int b = 3; // TODO: Initialize to an appropriate value int expected = 5; // TODO: Initialize to an appropriate value int actual; actual = target.add(a, b); Assert.AreEqual(expected, actual); }
public void TestNegativeMaxRangeSubtraction() { First target = new First(); // TODO: Initialize to an appropriate value int a = -10; int b = Int32.MaxValue; //int expected = 2147483649; int actual; try { actual = target.subtract(a, b); } catch (Exception e) { Assert.IsInstanceOfType(e, typeof(Exception)); } }
public void TestNegativeSubtraction() { First target = new First(); // TODO: Initialize to an appropriate value int a = 2; // TODO: Initialize to an appropriate value int b = 3; // TODO: Initialize to an appropriate value int expected = -1; // TODO: Initialize to an appropriate value int actual; actual = target.subtract(a, b); Assert.AreEqual(expected, actual); }