예제 #1
0
        public void ParseNumberAndFractionCorrectly()
        {
            string input  = "4 1/4";
            double answer = -1;

            answer = ParseHandler.measurementConversion(input);

            Assert.AreEqual(answer, 4.25);
        }
예제 #2
0
        public void ParseFractionCorrectly()
        {
            string input  = "3/4";
            double answer = -1;

            answer = ParseHandler.measurementConversion(input);

            Assert.AreEqual(answer, 0.75);
        }