public void VerifySupportOneCustomDelimiterOfAnyLength() { int answer = Calculator.AddNumbers("//[***]\n11***22***33"); Assert.IsTrue(answer == 66); }
public void AcceptsSingleInteger() { int answer = Calculator.AddNumbers("20"); Assert.IsTrue(answer == 20); }
public void AcceptsNewLineDelimiter() { int answer = Calculator.AddNumbers("1\n2,3"); Assert.IsTrue(answer == 6); }
public void ConvertsCharactersToZero() { int answer = Calculator.AddNumbers("5,tytyt"); Assert.IsTrue(answer == 5); }
public void AcceptsEmptyInput() { int answer = Calculator.AddNumbers(""); Assert.IsTrue(answer == 0); }
public void AcceptsTwoPositiveIntegers() { int answer = Calculator.AddNumbers("1,5000"); Assert.IsTrue(answer == 1); }
public void VerifyNegativeNumbersThrowAnException() { int answer = Calculator.AddNumbers("10,-20,-30,40,50,60,-75,100,1000,1001"); }
public void AcceptsManyIntegers() { int answer = Calculator.AddNumbers("1,2,3,4,5,6,7,8,9,10,11,12"); Assert.IsTrue(answer == 78); }