Пример #1
0
        public void PushOne_CountShouldBecomeOne()
        {
            IFragment fragment = new FakeFragment();

            this.collection.Push(fragment);
            Assert.AreEqual(1, this.collection.Count());
        }
Пример #2
0
        public void PopOneWhenCountOne_CountShouldBecomeZero()
        {
            IFragment fragment = new FakeFragment();

            this.collection.Push(fragment);
            this.collection.Pop();

            Assert.AreEqual(0, this.collection.Count());
        }
Пример #3
0
        public void PeekShouldNotChangeCount()
        {
            IFragment fragment = new FakeFragment();

            this.collection.Push(fragment);
            int count1 = this.collection.Count();

            fragment = this.collection.Peek();
            int count2 = this.collection.Count();

            Assert.AreEqual(count1, count2);
        }