Package org.shiftone.cache.util

Examples of org.shiftone.cache.util.RingFifo.dump()


    public void testSimple()
    {

        RingFifo fifo = new RingFifo(5);

        assertEquals(",,,,", fifo.dump());
        fifo.enqueue("A");
        assertEquals("A", fifo.peek());
        assertEquals("A,,,,", fifo.dump());
        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
View Full Code Here


        RingFifo fifo = new RingFifo(5);

        assertEquals(",,,,", fifo.dump());
        fifo.enqueue("A");
        assertEquals("A", fifo.peek());
        assertEquals("A,,,,", fifo.dump());
        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
        fifo.enqueue("D");
View Full Code Here

        assertEquals(",,,,", fifo.dump());
        fifo.enqueue("A");
        assertEquals("A", fifo.peek());
        assertEquals("A,,,,", fifo.dump());
        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
        fifo.enqueue("D");
        assertEquals("A,B,C,D,", fifo.dump());
        fifo.enqueue("E");
View Full Code Here

        assertEquals("A", fifo.peek());
        assertEquals("A,,,,", fifo.dump());
        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
        fifo.enqueue("D");
        assertEquals("A,B,C,D,", fifo.dump());
        fifo.enqueue("E");
        assertEquals("A,B,C,D,E", fifo.dump());
        fifo.enqueue("F");
View Full Code Here

        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
        fifo.enqueue("D");
        assertEquals("A,B,C,D,", fifo.dump());
        fifo.enqueue("E");
        assertEquals("A,B,C,D,E", fifo.dump());
        fifo.enqueue("F");
        assertEquals("F,B,C,D,E", fifo.dump());
        fifo.enqueue("G");
View Full Code Here

        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
        fifo.enqueue("D");
        assertEquals("A,B,C,D,", fifo.dump());
        fifo.enqueue("E");
        assertEquals("A,B,C,D,E", fifo.dump());
        fifo.enqueue("F");
        assertEquals("F,B,C,D,E", fifo.dump());
        fifo.enqueue("G");
        assertEquals("C", fifo.dequeue());
        assertEquals("D", fifo.dequeue());
View Full Code Here

        fifo.enqueue("D");
        assertEquals("A,B,C,D,", fifo.dump());
        fifo.enqueue("E");
        assertEquals("A,B,C,D,E", fifo.dump());
        fifo.enqueue("F");
        assertEquals("F,B,C,D,E", fifo.dump());
        fifo.enqueue("G");
        assertEquals("C", fifo.dequeue());
        assertEquals("D", fifo.dequeue());
        assertEquals("E", fifo.dequeue());
        assertEquals("F", fifo.dequeue());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.