public void CircularStack_Should_BeInitializedWithCollectionAndCapacity() { var items = new List <string> { "a", "b" }; var obj = new CircularStack <string>(items, 4); Assert.AreEqual(2, obj.Count); Assert.AreEqual(4, obj.Capacity); obj.ShouldContainElementsReversed(items); }
public void Peek_ShouldNot_RemoveItem() { var arr = new List <string> { "a", "b" }; var obj = new CircularStack <string>(arr); obj.Peek(); Assert.AreEqual(2, obj.Count); obj.ShouldContainElementsReversed(arr); }