Example #1
0
 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();
 }
Example #2
0
 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();
 }