コード例 #1
0
        public void ShouldBeAbleToAddUpperUsingAnd()
        {
            uniqueRandomGenerator.Next(lower, upper).Returns(2);

            var constraint = new BetweenConstraint(uniqueRandomGenerator, lower);

            constraint.And(upper);

            constraint.GetEnd();
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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();
            }
        }