Пример #1
0
        public void AddWithMonomial_CoeffArrayIs1and2and3and4and5_CoefficientIs9_DegreeIs3_1and2and3and13and5Returned()
        {
            var polynomial  = new Polynomial(new double[] { 1, 2, 3, 4, 5 });
            var coefficient = 9;
            var degree      = 3;
            var expected    = new Polynomial(new double[] { 1, 2, 3, 13, 5 });

            Assert.AreEqual(expected, polynomial.AddWithMonomial(coefficient, degree));
        }
Пример #2
0
 public Polynomial AddWithMonomial_Test(Polynomial polynomial, int coefficient, int degree) =>
 polynomial.AddWithMonomial(coefficient, degree);