public void ShouldDivideTwoFieldElements(BinaryOperationTestCase testCase) { // When var actual = testCase.Field.Divide(testCase.FirstOperand, testCase.SecondOperand); // Then Assert.Equal(testCase.Expected, actual); }
public void ShouldCalculateModulo(BinaryOperationTestCase testCase) { // Given var a = new Polynomial(testCase.Field, testCase.FirstOperandCoefficients); var b = new Polynomial(testCase.Field, testCase.SecondOperandCoefficients); // When var c = a % b; // Then Assert.Equal(new Polynomial(testCase.Field, testCase.ExpectedResultCoefficients), c); }
public void ShouldMultiplyTwoPolynomials(BinaryOperationTestCase testCase) { Assert.Equal(testCase.Expected, testCase.FirstOperand * testCase.SecondOperand, EqualityComparer <BiVariablePolynomial> .Default); }