public void NextDoubleReturnsTopOfDoubleQueue() { TestRandom rand = new TestRandom(); rand.DoubleQueue.Enqueue(1.1); Assert.AreEqual(1.1, rand.NextDouble(), "The result of NextDouble should have been the top of the DoubleQueue."); }
public void NextDoublePopsTheTopOfTheDoubleQueue() { TestRandom rand = new TestRandom(); rand.DoubleQueue.Enqueue(1.2); if(rand.DoubleQueue.Count != 1) Assert.Fail("Unable to determine the size of DoubleQueue."); rand.NextDouble(); Assert.AreEqual(0, rand.DoubleQueue.Count, "The number of items left in DoubleQueue should be zero."); }