예제 #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));
        }
예제 #2
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));
      }
    }
예제 #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));
            }
        }
예제 #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));
            }
        }
예제 #5
0
 public void TestNext() {
   DefaultRandom randomNumberGenerator = new DefaultRandom();
   for(int index = 0; index < Specifications.ProbabilisticFunctionSamples; ++index) {
     Assert.That(randomNumberGenerator.Next(12345), Is.LessThan(12345));
   }
 }
예제 #6
0
    public void TestReseed() {
      DefaultRandom one = new DefaultRandom(123456789);
      DefaultRandom two = new DefaultRandom(123456789);

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