Code example for PriorityQueue

Methods: comparator, size

0
 
    /** 
     * @tests java.util.PriorityQueue#PriorityQueue() 
     */ 
    public void test_Constructor() { 
        PriorityQueue<Object> queue = new PriorityQueue<Object>();
        assertNotNull(queue);
        assertEquals(0, queue.size());
        assertNull(queue.comparator());
    } 
 
    /** 
     * @tests java.util.PriorityQueue#PriorityQueue(int) 
     */ 
    public void test_ConstructorI() { 
        PriorityQueue<Object> queue = new PriorityQueue<Object>(100);
        assertNotNull(queue);
        assertEquals(0, queue.size());
        assertNull(queue.comparator());
    }