public void Offload_ExposesBottomOfFromStack() { PseudoQ <int> qu = new PseudoQ <int>(); qu.Enqueue(5); qu.Enqueue(3); qu.Enqueue(1); qu.Offload(qu.Frontend, qu.Backend); Assert.Equal(5, qu.Backend.Top.Value); }
public void Offload_EmptiesFromStack() { PseudoQ <int> qu = new PseudoQ <int>(); qu.Enqueue(5); qu.Enqueue(3); qu.Enqueue(1); qu.Offload(qu.Frontend, qu.Backend); Assert.Null(qu.Frontend.Top); }