public void FixedCapacityStack_AddMoreItems_ResultsOverflow() { IFixedCapacityStack <FakeGameObject> a = new FixedCapacityStack <FakeGameObject>(1); a.push(new FakeGameObject("first")); Assert.That(() => a.push(new FakeGameObject("second")), Throws.TypeOf <IndexOutOfRangeException>()); }
public void FixedCapacityStack_PushAndPopFakeGameObject_TheSameName() { IFixedCapacityStack <FakeGameObject> a = new FixedCapacityStack <FakeGameObject>(10); a.push(new FakeGameObject("first")); var res = a.pop(); Assert.AreEqual("first", res.Name); }