Exemplo n.º 1
0
            public void RiseBy1()
            {
                var polynomial     = new Polynomials.BinaryPolynomial("1010");
                var riseDifference = 1;
                var expecting      = 20;

                polynomial.RiseDegree(riseDifference).Polynomial.Should().Be((uint)expecting);
            }
Exemplo n.º 2
0
            public void RiseBy2()
            {
                var polynomial     = new Polynomials.BinaryPolynomial("11001");
                var riseDifference = 2;
                var expecting      = 100;

                polynomial.RiseDegree(riseDifference).Polynomial.Should().Be((uint)expecting);
            }
Exemplo n.º 3
0
            public void ShouldThrowExceptionOnNegativeRiseDifference()
            {
                var    polynomial     = new Polynomials.BinaryPolynomial("10100");
                var    riseDifference = -5;
                Action act            = () =>
                {
                    var newPolynomial = polynomial.RiseDegree(riseDifference);
                };

                act.ShouldThrow <Exception>();
            }