コード例 #1
0
        public void kataProblem4(string numbers, int expectedResult)
        {
            int result = StringCalculator.Add(numbers);

            Assert.AreEqual(expectedResult, result);
        }
コード例 #2
0
        public void Add_UnknownNumbers_With_various_Seperator(string numbers, int expectedResult)
        {
            int result = StringCalculator.Add(numbers);

            Assert.AreEqual(expectedResult, result);
        }
コード例 #3
0
        [TestCase("1, ,2", 3)]  //needs to ahve something inside
        public void Add_TwoNumbers_ReturnSum(string numbers, int expectedResult)
        {
            int result = StringCalculator.Add(numbers);

            Assert.AreEqual(expectedResult, result);
        }
コード例 #4
0
        [TestCase("c", 44)] //parses c into ascii number
        public void Add_OneNumber_ReturnSelf(string blah, int expectedResult)
        {
            int result = StringCalculator.Add(blah);

            Assert.AreEqual(expectedResult, result);
        }
コード例 #5
0
 public void BeforeEachTest()
 {
     _stringCalculator = new StringCalculator();
     Console.WriteLine("SetUp Called");
 }
コード例 #6
0
 public void SetUp()
 {
     calculator = new StringCalculator();
 }