コード例 #1
0
        public void Add_AnyLengthDelimiter(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #2
0
        public void Add_Negatives_ThrowsException(string input, string expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, Assert.ThrowsException <Exception>(() => calculator.Add(input)).Message);
        }
コード例 #3
0
        public void Add_WhenNumbersOver1000_DontAdd(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #4
0
        public void Add_MoreThanTwoNumbers(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #5
0
        public void Add_CommaDelimFormat(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #6
0
        public void Add_WhenSingleNumber_ReturnNumber(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #7
0
        public void Add_EmptyString(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }
コード例 #8
0
        public void Add_MultipleDelimiters(string input, int expected)
        {
            var calculator = new Calc();

            Assert.AreEqual(expected, calculator.Add(input));
        }