public void should_perform_correct_calculation() { var spy = new AdderSpy(); var sut = new BasicMathematics { Adder = spy }; var product = sut.Multiply(4, 3); Assert.That(spy.AddCalls, Is.EqualTo(new List<string>(){"0+3", "3+3", "6+3", "9+3"})); Assert.That(product, Is.EqualTo(12)); }
public void should_return_correct_results(int a, int b, int result) { var sut = new BasicMathematics(); Assert.That(sut.Multiply(a, b), Is.EqualTo(result)); }