Code example for PriorityQueue

Methods: comparator, size

0
 
    /** 
     * @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());
    } 
 
    /** 
     * @tests java.util.PriorityQueue#PriorityQueue(int, Comparator<? super E>) 
     */ 
    public void test_ConstructorILjava_util_Comparator() { 
        PriorityQueue<Object> queue = new PriorityQueue<Object>(100,
                (Comparator<Object>) null);
        assertNotNull(queue);
        assertEquals(0, queue.size());
        assertNull(queue.comparator());