コード例 #1
0
        public void TestTermWithPowers()
        {
            string sTerm = "123x^3";
              Term term = new Term(sTerm);

              Assert.AreEqual(123, term.Coef);
              Assert.AreEqual(3, term.Power);
        }
コード例 #2
0
        public void TestTermConstant()
        {
            string sTerm = "58";
              Term term = new Term(sTerm);

              Assert.AreEqual(58, term.Coef);
              Assert.AreEqual(0, term.Power);
        }
コード例 #3
0
        public void TestTermWithNegitiveCoef()
        {
            string sTerm = "-123x^3";
              Term term = new Term(sTerm);

              Assert.AreEqual(-123, term.Coef);
              Assert.AreEqual(3, term.Power);
        }
コード例 #4
0
 public void TestInvalidInput()
 {
     string sTerm = "3889sjow";
       Term term = new Term(sTerm);
 }