Esempio n. 1
0
        public void Can_Create_Empty_PseudoQueue()
        {
            //act
            pseudoQueue <int> testPQ = new DSA.pseudoQueue <int>();

            //assert
            Assert.NotNull(testPQ);
        }
Esempio n. 2
0
        public void Enqueue_Works_Test()
        {
            //arrange
            pseudoQueue <int> testPQ = new DSA.pseudoQueue <int>();

            //act
            testPQ.enqueue(563);

            //Assert
            Assert.Equal(563, testPQ.peekRear());
        }
Esempio n. 3
0
        public void Dequeue_Works_Test()
        {
            //arrange
            pseudoQueue <int> testPQ = new DSA.pseudoQueue <int>();

            testPQ.enqueue(563);
            //act
            int actual = testPQ.dequeue();

            //Assert
            Assert.Equal(563, actual);
        }
Esempio n. 4
0
        public void Dequeue_Empty_Throws_Exception_Test()
        {
            //arrange
            pseudoQueue <int> testPQ = new DSA.pseudoQueue <int>();

            //Assert
            //Assert
            Assert.Throws <DataStructures.StackAndQueue.StackEmptyException>(() =>
            {
                //act
                testPQ.dequeue();
            });
        }