public void RandomizersWithDifferentSeedsReturnDifferentValues()
        {
            Randomizer r1 = new Randomizer(1234);
            Randomizer r2 = new Randomizer(4321);

            for (int i = 0; i < 10; i++)
                Assert.That(r1.NextDouble(), Is.Not.EqualTo(r2.NextDouble()));
        }
        public void RandomizersWithSameSeedsReturnSameValues()
        {
            Randomizer r1 = new Randomizer(1234);
            Randomizer r2 = new Randomizer(1234);

            for (int i = 0; i < 10; i++)
                Assert.That(r1.NextDouble(), Is.EqualTo(r2.NextDouble()));
        }
            public static void RandomizersWithDifferentSeedsReturnDifferentValues()
            {
                var r1 = new Randomizer(1234);
                var r2 = new Randomizer(4321);

                for (int i = 0; i < 10; i++)
                    Assert.That(r1.NextDouble(), Is.Not.EqualTo(r2.NextDouble()));
            }
            public static void RandomizersWithSameSeedsReturnSameValues()
            {
                var r1 = new Randomizer(1234);
                var r2 = new Randomizer(1234);

                for (int i = 0; i < 10; i++)
                    Assert.That(r1.NextDouble(), Is.EqualTo(r2.NextDouble()));
            }
        public void RandomDoublesAreUnique()
        {
            Randomizer r = new Randomizer();

            double[] values = new double[10];
            for (int i = 0; i < 10; i++)
                values[i] = r.NextDouble();

            Assert.That(values, Is.Unique);
        }
Example #6
0
        public void RandomDoublesAreUnique()
        {
            Randomizer r = new Randomizer();

            double[] values = new double[10];
            for (int i = 0; i < 10; i++)
            {
                values[i] = r.NextDouble();
            }

            Assert.That(values, Is.Unique);
        }