public void SubstractNegativeFractionsTest(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.Substract(left, right); Assert.Equal(resNum, result.Numerator); Assert.Equal(resDen, result.Denominator); }
public void SubstractTest( int minuendNumerator, int minuendDenominator, int subtrahendNumerator, int subtrahendDenominator, int expectedNumerator, int expectedDenominator) { var minuend = new Fraction(minuendNumerator, minuendDenominator); var subtrahend = new Fraction(subtrahendNumerator, subtrahendDenominator); var diff = _calculator.Substract(minuend, subtrahend); Assert.AreEqual(expectedNumerator, diff.Numerator); Assert.AreEqual(expectedDenominator, diff.Denominator); }