public void RandomWrapper_Work()
        {
            // Set up the random instance.
            var random        = new Random();
            var randomWrapper = new RandomWrapper(random);

            // Validate.
            Assert.NotNull(randomWrapper);

            // Validate random generation.
            var num = randomWrapper.Next();

            Assert.True(num >= 0);
            num = randomWrapper.Next(5);
            Assert.InRange(num, 0, 5);
            num = randomWrapper.Next(0, 5);
            Assert.InRange(num, 0, 5);
        }
Example #2
0
        public void RandomWrapper_Work()
        {
            // Set up the random instance.
            var random        = new Random();
            var randomWrapper = new RandomWrapper(random);

            // Validate.
            randomWrapper.Should().NotBeNull();

            // Validate random generation.
            var num = randomWrapper.Next();

            num.Should().BeGreaterOrEqualTo(0);
            num = randomWrapper.Next(5);
            num.Should().BeInRange(0, 5);
            num = randomWrapper.Next(0, 5);
            num.Should().BeInRange(0, 5);
        }