public void RiseBy1() { var polynomial = new Polynomials.BinaryPolynomial("1010"); var riseDifference = 1; var expecting = 20; polynomial.RiseDegree(riseDifference).Polynomial.Should().Be((uint)expecting); }
public void RiseBy2() { var polynomial = new Polynomials.BinaryPolynomial("11001"); var riseDifference = 2; var expecting = 100; polynomial.RiseDegree(riseDifference).Polynomial.Should().Be((uint)expecting); }
public void ShouldThrowExceptionOnNegativeRiseDifference() { var polynomial = new Polynomials.BinaryPolynomial("10100"); var riseDifference = -5; Action act = () => { var newPolynomial = polynomial.RiseDegree(riseDifference); }; act.ShouldThrow <Exception>(); }