public void AddTermsOfPowerTest2() { Polynomial p = new Polynomial("7x+x=0"); Term result = p.AddTermsOfPower(EquationSide.Left, 'x', 1); Assert.AreEqual(8, result.Coef); Assert.AreEqual('x', result.VariableSymbol); Assert.AreEqual(1, result.Power); }
public void AddTermsOfPowerTest3() { Polynomial p = new Polynomial("25+20=0"); Term result = p.AddTermsOfPower(EquationSide.Left, Term.DefaultVariableSymbol, 0); Assert.AreEqual(45, result.Coef); Assert.AreEqual(Term.DefaultVariableSymbol, result.VariableSymbol); Assert.AreEqual(0, result.Power); }
public void AddTermsOfPowerTest() { Polynomial p = new Polynomial("2x^2+2x^2=0"); Term result = p.AddTermsOfPower(EquationSide.Left, 'x', 2); Assert.AreEqual(4, result.Coef); Assert.AreEqual('x', result.VariableSymbol); Assert.AreEqual(2, result.Power); }