コード例 #1
0
 public void ShouldAllowUsertoChangeDefaultDelim()
 {
     Calculator target = new Calculator();
     int actual = target.Add("//;\n1;2");
     int expected = 3;
     Assert.AreEqual(expected, actual);
 }
コード例 #2
0
 public void ShouldHandleN_NumbersAndReturnSum()
 {
     Calculator target = new Calculator();
     int actual = target.Add("1,2,3,4");
     int expected = 10;
     Assert.AreEqual(expected, actual);
 }
コード例 #3
0
 public void ShouldHandleNewLinesAndCommas()
 {
     Calculator target = new Calculator();
     int actual = target.Add("1\n2,3");
     int expected = 6;
     Assert.AreEqual(expected, actual);
 }
コード例 #4
0
 public void ShouldAddNumbersAndReturnSum()
 {
     Calculator target = new Calculator();
     int actual = target.Add("1,2");
     int expected = 3;
     Assert.AreEqual(expected,actual);
 }