public void DevideFractionsThrowDevideByZeroExceptionTest() { var left = new Fraction(1, 2); var right = new Fraction(0, 3); Assert.Throws <DivideByZeroException>(() => FractionCalculator.Devide(left, right)); }
public void DevideFractionsTest(int leftNum, int leftDen, int rightNum, int rightDen, int resNum, int resDen) { var left = new Fraction(leftNum, leftDen); var right = new Fraction(rightNum, rightDen); var result = FractionCalculator.Devide(left, right); Assert.Equal(resNum, result.Numerator); Assert.Equal(resDen, result.Denominator); }