public void SingleNumberReturnsSum() { Calculator calc = new Calculator(); int result = calc.Add("3"); Assert.AreEqual(3, result); }
public void EmptyStringReturnsZero() { Calculator calc = new Calculator(); int result = calc.Add(""); Assert.AreEqual(0, result); }
public void TwoNumbersReturnsSum(string input, int expectedResult) { //Arrange Calculator calc = new Calculator(); //Act int result = calc.Add(input); //Assert Assert.AreEqual(expectedResult, result); }
public void NewLinesBetweenNums() { Calculator calc = new Calculator(); int result = calc.Add("1\n2,3"); Assert.AreEqual(6, result); }