Exemple #1
0
        public void TestReseed()
        {
            DefaultRandom one = new DefaultRandom(123456789);
            DefaultRandom two = new DefaultRandom(123456789);

            Assert.AreEqual(one.Next(int.MaxValue), two.Next(int.MaxValue));
        }
    public void TestNextDouble() {
      DefaultRandom randomNumberGenerator = new DefaultRandom();
      for(int index = 0; index < Specifications.ProbabilisticFunctionSamples; ++index) {
        double randomNumber = randomNumberGenerator.NextDouble();

        Assert.That(randomNumber, Is.GreaterThanOrEqualTo(0.0));
        Assert.That(randomNumber, Is.LessThan(1.0));
      }
    }
Exemple #3
0
        public void TestNext()
        {
            DefaultRandom randomNumberGenerator = new DefaultRandom();

            for (int index = 0; index < Specifications.ProbabilisticFunctionSamples; ++index)
            {
                Assert.That(randomNumberGenerator.Next(12345), Is.LessThan(12345));
            }
        }
Exemple #4
0
        public void TestNextDouble()
        {
            DefaultRandom randomNumberGenerator = new DefaultRandom();

            for (int index = 0; index < Specifications.ProbabilisticFunctionSamples; ++index)
            {
                double randomNumber = randomNumberGenerator.NextDouble();

                Assert.That(randomNumber, Is.GreaterThanOrEqualTo(0.0));
                Assert.That(randomNumber, Is.LessThan(1.0));
            }
        }
 public void TestNext() {
   DefaultRandom randomNumberGenerator = new DefaultRandom();
   for(int index = 0; index < Specifications.ProbabilisticFunctionSamples; ++index) {
     Assert.That(randomNumberGenerator.Next(12345), Is.LessThan(12345));
   }
 }
    public void TestReseed() {
      DefaultRandom one = new DefaultRandom(123456789);
      DefaultRandom two = new DefaultRandom(123456789);

      Assert.AreEqual(one.Next(int.MaxValue), two.Next(int.MaxValue));
    }