Пример #1
0
        public void new_Stack_can_Put_up_to_max_capacity()
        {
            var s = new CountableStack <int>(3);

            s.Put(100);
            Assert.IsTrue(s.CanPut());
            s.Put(150);
            Assert.IsTrue(s.CanPut());
            s.Put(200);
            Assert.IsFalse(s.CanPut());
        }
Пример #2
0
        public void new_Stack_can_Put()
        {
            var s = new CountableStack <int>(3);

            Assert.IsTrue(s.CanPut());
        }
Пример #3
0
        public void Stack_with_0_capacity_cannot_Put()
        {
            var s = new CountableStack <int>(0);

            Assert.IsFalse(s.CanPut());
        }