public void Test_GetRandomDouble_ShouldReturnDouble() { //---------------Set up test pack------------------- //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var randomDouble = RandomValueGen.GetRandomDouble(); //---------------Test Result -----------------------G Assert.IsNotNull(randomDouble); Assert.AreNotEqual(RandomValueGen.GetRandomDouble(), randomDouble, "Should not ret same value twice"); }
public void Test_GetRandomDoubleWhenMinAndMax_ShouldReturnDoubleWithinRange() { //---------------Set up test pack------------------- const double maxValue = 24; const double minValue = 22; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var randomDouble = RandomValueGen.GetRandomDouble(minValue, maxValue); //---------------Test Result -----------------------G Assert.IsNotNull(randomDouble); Assert.Greater(randomDouble, minValue); Assert.LessOrEqual(randomDouble, maxValue); }