Exemplo n.º 1
0
        public void EmptyQueue_IsEmpty_RetursTrue()
        {
            dllQueue <int> queue         = new dllQueue <int>();
            bool           isEmptyResult = queue.IsEmpty();

            Assert.IsTrue(isEmptyResult);
        }
Exemplo n.º 2
0
        public void EnqueueOneElement_IsEmpty_RetursFalse()
        {
            dllQueue <int> queue          = new dllQueue <int>();
            int            valueToEnqueue = -1;

            queue.Enqueue(valueToEnqueue);
            bool isEmptyResult = queue.IsEmpty();

            Assert.IsFalse(isEmptyResult);
        }
Exemplo n.º 3
0
        public void EnqueueOneElement_DequeueOnce_IsEmpty_ReturnsTrue()
        {
            dllQueue <int> queue   = new dllQueue <int>();
            int            element = -1;

            queue.Enqueue(element);
            queue.Dequeue();
            bool isEmptyResult = queue.IsEmpty();

            Assert.IsTrue(isEmptyResult);
        }
Exemplo n.º 4
0
        public void EnqueueTwoElements_DequeueOnce_IsEmpty_ReturnsFalse()
        {
            dllQueue <int> queue        = new dllQueue <int>();
            int            firstElement = 1;
            int            secElement   = 2;

            queue.Enqueue(firstElement);
            queue.Enqueue(secElement);
            queue.Dequeue();

            bool isEmptyRes = queue.IsEmpty();

            Assert.IsFalse(isEmptyRes);
        }