public void DivisionAccumulator_ZeroInteger_EqualThrow() { var calc = new calculator(); calc.Add(6); Assert.Catch <DivideByZeroException>(() => calc.Divide(0)); }
public void Divide_NonZero_Equal() { var uut = new calculator(); var ans = uut.Divide(6, 2); Assert.AreEqual(3, ans); }
public void DivisionAccumulator_NegativeAndPositiveInteger_Equal() { var calc = new calculator(); var calculated = calc.Add(-4); calculated = calc.Divide(4); Assert.AreEqual(-1, calculated); }
public void Divide_4_By_2_Return2() { uut.divident = 4; uut.divisor = 2; Assert.That(uut.Divide(uut.divident, uut.divisor), Is.EqualTo(2)); }
public void Divide_Zero_EqualThrow() { var uut = new calculator(); Assert.Catch <DivideByZeroException>(() => uut.Divide(6, 0)); }