public void TestDivideException() { ICalculatingStack calc = new CalculatingStack(); Assert.Equal(0, calc.Current); calc.Add(4); Assert.Throws <ArgumentException>(() => calc.Divide(0)); }
public void DivideTest3(int x, int y, int res) { ICalculatingStack calc = new CalculatingStack(); calc.Add(x); calc.Divide(y); Assert.Equal(calc.Current, res); }
public void TestDivide() { ICalculatingStack calc = new CalculatingStack(); Assert.Equal(0, calc.Current); calc.Add(8); calc.Divide(4); Assert.Equal(2, calc.Current); }