public void Add_GivenAnEmptyOrNullNumber_ShouldReturn0(string numbers) { //Arrange var sut = new StringCalculator(); //Act var actual = sut.Add(numbers); //Assert int expected = 0; Assert.AreEqual(expected, actual); }
public void kataProblem4(string numbers, int expectedResult) { int result = StringCalculator.Add(numbers); Assert.AreEqual(expectedResult, result); }
public void EmptyString_ShouldReturnZero() { int sum = calculator.Add(String.Empty); Assert.That(sum, Is.EqualTo(0)); }
public void Add_UnknownNumbers_With_various_Seperator(string numbers, int expectedResult) { int result = StringCalculator.Add(numbers); Assert.AreEqual(expectedResult, result); }
[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); }
[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); }
public void Add_EmptyString_ReturnZero() { int result = _stringCalculator.Add(""); Assert.AreEqual(0, result); }
public void EmptyStringInputReturnsZero() { Assert.AreEqual(0, calculator.Add("")); }