public void ShouldCalculateSumOfsingleValueInaString(string input, int output) { _stringCalculator = new StringCalculator(input); var sumOfValuesOFThestring = _stringCalculator.GetTheCalculatedValue(); Assert.That(sumOfValuesOFThestring, Is.EqualTo(output)); }
public void ShouldNotAllowNumberBiggerThanThousandAndWithManyDelemiters(string input) { _stringCalculator = new StringCalculator(input); var sumOfValueInAString = _stringCalculator.GetTheCalculatedValue(); Assert.That(sumOfValueInAString, Is.EqualTo(6)); }
public void ShouldReturnSumOfValuesInAStringStartingWithDelimeter(string input, int output) { _stringCalculator = new StringCalculator(input); var sumOfValueInAString = _stringCalculator.GetTheCalculatedValue(); Assert.That(sumOfValueInAString, Is.EqualTo(output)); }
public void ShouldThrowAnExceptionwhenNegativeNumberIsPassed(string input) { _stringCalculator = new StringCalculator(input); Assert.Throws<System.NotSupportedException>(() => _stringCalculator.GetTheCalculatedValue()); }