public void RepeatedSubtractingWorks() { Scenario <Calculator> . With(new Calculator()). Given(c => c.Total = 100). When(c => c.SubtractValue(10)). Happens(Times.Many(5)). Then(c => Assert.That(c.Total, Is.EqualTo(50))). Run(); }
public void RepeatedAddingWorks() { Scenario <Calculator> . With(new Calculator()). Given(c => c.Total = 0). When(c => c.AddValue(1)). Happens(Times.Many(10)). Then(c => Assert.That(c.Total, Is.EqualTo(10))). Run(); }