コード例 #1
0
        public void LevelInAndOut3_I2Plus3I55Minus35IIMulty6PlusI5Minus2I_Expected375()
        {
            // arrange
            string input    = "(2+3(55-35))*6+(5-2)";
            string expected = "375";
            // act
            string result = MyCalc.Answer(input);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void LevelOperation_2Plus3Multy6_Expected20()
        {
            // arrange
            string input    = "2+3*6";
            string expected = "20";
            // act
            string result = MyCalc.Answer(input);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        public void LevelInAndOut1_I2Plus3IMulty6_Expected30()
        {
            // arrange
            string input    = "(2+3)*6";
            string expected = "30";
            // act
            string result = MyCalc.Answer(input);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #4
0
        public void PlusOperation_2Plus3_Expected6()
        {
            // arrange
            string input    = "2+3";
            string expected = "5";
            // act
            string result = MyCalc.Answer(input);

            // assert
            Assert.AreEqual(expected, result);
        }