public void TestTermWithPowers() { string sTerm = "123x^3"; Term term = new Term(sTerm); Assert.AreEqual(123, term.Coef); Assert.AreEqual(3, term.Power); }
public void TestTermConstant() { string sTerm = "58"; Term term = new Term(sTerm); Assert.AreEqual(58, term.Coef); Assert.AreEqual(0, term.Power); }
public void TestTermWithNegitiveCoef() { string sTerm = "-123x^3"; Term term = new Term(sTerm); Assert.AreEqual(-123, term.Coef); Assert.AreEqual(3, term.Power); }
public void TestInvalidInput() { string sTerm = "3889sjow"; Term term = new Term(sTerm); }