Beispiel #1
0
        public void DoubleGeneratorWithDefaultValues()
        {
            IGenerator <double> doublegen = new DoubleGenerator();
            var checkme = (double)doublegen.Generate();

            Assert.IsNotNull(checkme);
            Assert.That(checkme, Is.InRange(0.00, 100.00));
        }
        public void GenerateWorks(double value, string expected)
        {
            // Arrange
            var random = new Mock <IRandomNumber>();
            var x      = random.Setup(x => x.Next(double.MinValue, double.MaxValue)).Returns(value);


            var sut = new DoubleGenerator(random.Object);

            // Act
            var result = sut.Generate();

            // assert
            Assert.Equal(expected, result);
        }
 public void DoubleGeneratorWithDefaultValues()
 {
     IGenerator<double> doublegen = new DoubleGenerator();
     var checkme = (double) doublegen.Generate();
     Assert.IsNotNull(checkme);
     Assert.That(checkme, Is.InRange(0.00, 100.00));
 }