public void ImplementsINumberArrayTotaler() { // Arrange var totaler = new NumberArrayTotaler(); // Act // Assert Assert.IsTrue(totaler is INumberArrayTotaler); }
public void TotalWithEmptyArrayReturnsZero() { // Arrange var expected = 0; var totaler = new NumberArrayTotaler(); // Act var actual = totaler.Total(new string[] { }); // Assert Assert.AreEqual(expected, actual); }
public void TotalWithArrayContainingTwoAndThreeReturnsFive() { // Arrange var expected = 5; var totaler = new NumberArrayTotaler(); // Act var actual = totaler.Total(new string[] { "2", "3" }); // Assert Assert.AreEqual(expected, actual); }
public void TotalWithArrayContainingOneAndTwoAndThreeAndFourReturnsTen() { // Arrange var expected = 10; var totaler = new NumberArrayTotaler(); // Act var actual = totaler.Total(new string[] { "1", "2", "3", "4" }); // Assert Assert.AreEqual(expected, actual); }