public void Add_WhenCalled_ChangesSum() { InMemoryCalculator testCalc = MakeTestInMemoryCalculator(); testCalc.Add(1); int sum = testCalc.FinalSum(); Assert.AreEqual(1, sum); }
public void Sum_ByDefault_ReturnsZero() { // Arrange InMemoryCalculator testCalc = MakeTestInMemoryCalculator(); // Act int lastSum = testCalc.FinalSum(); // Assert Assert.AreEqual(0, lastSum); }