public void ShouldBeAbleToAddUpperUsingAnd() { uniqueRandomGenerator.Next(lower, upper).Returns(2); var constraint = new BetweenConstraint(uniqueRandomGenerator, lower); constraint.And(upper); constraint.GetEnd(); }
public void ShouldBeAbleToAddUpperUsingAnd() { using (mocks.Record()) { uniqueRandomGenerator.Expect(x => x.Next(lower, upper)).Return(2); } var constraint = new BetweenConstraint(uniqueRandomGenerator, lower); constraint.And(upper); using (mocks.Playback()) { constraint.GetEnd(); } }
public void ShouldBeAbleToAddUpperUsingAnd() { using (mocks.Record()) { uniqueRandomGenerator.Expect(x => x.Next(lower, upper)).Return(2); } var constraint = new BetweenConstraint(uniqueRandomGenerator, lower); constraint.And(upper); using (mocks.Playback()) { constraint.GetEnd(); } }