コード例 #1
0
        public void CalculateOperation_OperatorTextIsNotCorrect_ReturnsEmptyString()
        {
            var addition = new AdditionOperator();
            var result   = addition.CalculateOperation(1, 2, "GUM");

            Assert.AreEqual(string.Empty, result);
        }
コード例 #2
0
        public void CalculateOperation_OperatorTextIsCorrect_ReturnStringShowingOperation()
        {
            var addition = new AdditionOperator();
            var result   = addition.CalculateOperation(1, 2, "SUM");

            Assert.AreEqual(string.Format("{0} + {1} = {2}", 1, 2, 1 + 2), result);
        }