Example #1
0
        public void PushTwoOverLimit_RemoveFirstTwoInserted()
        {
            var collection = new DistinctMaxStack <int>(3);

            collection.Push(1);
            collection.Push(2);
            collection.Push(3);
            collection.Push(4);
            collection.Push(5);

            var expectedCollection = new[] { 5, 4, 3 };

            collection.Should().BeEquivalentTo(expectedCollection);
        }