public void DefaultPrnGeneratorProvidesPositiveLong()
        {
            // given
            var randomGenerator = new DefaultPrnGenerator();

            //when
            var randomNumber = randomGenerator.NextPositiveLong();

            // then
            Assert.That(randomNumber, Is.GreaterThanOrEqualTo(0));
            Assert.That(randomNumber, Is.LessThan(long.MaxValue));
        }
Exemple #2
0
        public void DefaultPrnGeneratorProvidesPercentageVAlue()
        {
            // given
            var randomGenerator = new DefaultPrnGenerator();

            for (var i = 0; i < 100; i++)
            {
                //when
                var randomNumber = randomGenerator.NextPercentageValue();

                // then
                Assert.That(randomNumber, Is.GreaterThanOrEqualTo(0));
                Assert.That(randomNumber, Is.LessThan(100));
            }
        }