예제 #1
0
        public void NextDoubleTest()
        {
            var random = new MockRandom
            {
                MockNextDouble = double.NegativeInfinity
            };

            var nextDouble = random.NextDouble();

            Assert.IsTrue(double.IsNegativeInfinity(nextDouble), $@"Expected negative infinity, got {nextDouble}.");
        }
예제 #2
0
        public void NextDoubleMinimumMaximumTest()
        {
            var random = new MockRandom();

            Assert.ThrowsException <ArgumentOutOfRangeException>(() => random.NextDouble(1, 0));
        }