public void ShouldDivideTwoFieldElements(BinaryOperationTestCase testCase)
        {
            // When
            var actual = testCase.Field.Divide(testCase.FirstOperand, testCase.SecondOperand);

            // Then
            Assert.Equal(testCase.Expected, actual);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void ShouldMultiplyTwoPolynomials(BinaryOperationTestCase testCase)
 {
     Assert.Equal(testCase.Expected, testCase.FirstOperand * testCase.SecondOperand, EqualityComparer <BiVariablePolynomial> .Default);
 }