public void Divide_DenominatorZero_ShouldThrowDivideByZeroException() { var cmc = new ComplexMathClass(); //cmc.Divide(5, 0); Assert.Throws <DivideByZeroException>(() => cmc.Divide(5, 0)); }
public void Add_TwoIntegers_ShouldCalculateCorrectly(int x, int y, int expectedResult) { var cmc = new ComplexMathClass(); int actualResult = cmc.Add(x, y); Assert.Equal <int>(expectedResult, actualResult); }
public void Divide_DenominatorZero_ShouldThrowDivideByZeroException() { var cmc = new ComplexMathClass(); //cmc.Divide(5, 0); Assert.Throws<DivideByZeroException>(() => cmc.Divide(5, 0)); }
public void Add_TwoIntegers_ShouldCalculateCorrectly(int x, int y, int expectedResult) { var cmc = new ComplexMathClass(); int actualResult = cmc.Add(x, y); Assert.Equal<int>(expectedResult, actualResult); }
public void Divide_DenominatorZero_ShouldThrowDivideByZeroException() { var cmc = new ComplexMathClass(); double result = cmc.Divide(5, 0); }
public int Add_TwoIntegers_ShouldCalculateCorrectly(int x, int y) { var cmc = new ComplexMathClass(); return cmc.Add(x, y); }
public void Divide_DenominatorZero_ShouldThrowDivideByZeroException() { var cmc = new ComplexMathClass(); cmc.Divide(5, 0); }
public int Add_TwoIntegers_ShouldCalculateCorrectly(int x, int y) { var cmc = new ComplexMathClass(); return(cmc.Add(x, y)); }