예제 #1
0
        // ---- SECTION: public instance methods --------------*
        #region Public Instance Methods

        public string ToDecimalString(int accuracy)
        {
            List <string> lst = new List <string>();

            lst.Add(m_numerator.ToString());
            lst.Add(Denominator.ToString());
            return(StringMath.divide(lst, accuracy));
        }
 public static void TestMultiplication(string expression1, string expression2, string answer)
 {
     Assert.Equal(answer, StringMath.MultiplyStrings(expression1, expression2));
 }
 public static void TestPower(string expression1, string expression2, string answer)
 {
     Assert.Equal(answer, StringMath.PowerStrings(expression1, expression2));
 }
 public static void TestAddition(string expression1, string expression2, string answer)
 {
     Assert.Equal(answer, StringMath.AddStrings(expression1, expression2));
 }
 public static void TestDivision(string expression1, string expression2, string answer)
 {
     Assert.Equal(answer, StringMath.DivideStrings(expression1, expression2));
 }