コード例 #1
0
        public void Push_OneElement_ShouldReturnItWhenPeek()
        {
            var saq = new SimpleArrayQueue <bool>();

            saq.Push(true);

            Assert.AreEqual(true, saq.Peek());
        }
コード例 #2
0
        public void Push_OneElement_ShouldReturnItWhenPop()
        {
            var saq = new SimpleArrayQueue <bool>();

            saq.Push(true);

            Assert.AreEqual(true, saq.Pop());
            Assert.Throws <ArgumentOutOfRangeException>(() => saq.Pop());
        }