Package org.apache.qpid.server.subscription.SubscriptionList

Examples of org.apache.qpid.server.subscription.SubscriptionList.SubscriptionNodeIterator


        assertTrue("Deleting subscription node should have succeeded",
                getNodeForSubscription(_subList, _sub1).delete());
        assertNotNull("Should still have been a node present for the deleted subscription",
                getNodeForSubscription(_subList, _sub1));

        SubscriptionNodeIterator iter = _subList.iterator();

        //verify the iterator returns the 2nd subscriptions node
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub2, iter.getNode().getSubscription());

        //verify the iterator returns the 3rd subscriptions node and not the 2nd.
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub3, iter.getNode().getSubscription());
    }
View Full Code Here


        assertTrue("Deleting subscription node should have succeeded",
                getNodeForSubscription(_subList, _sub2).delete());
        assertNotNull("Should still have been a node present for the deleted subscription",
                getNodeForSubscription(_subList, _sub2));

        SubscriptionNodeIterator iter = _subList.iterator();

        //verify the iterator returns the 1st subscriptions node
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub1, iter.getNode().getSubscription());

        //verify the iterator returns the 3rd subscriptions node and not the 2nd.
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub3, iter.getNode().getSubscription());
    }
View Full Code Here

        assertTrue("Deleting subscription node should have succeeded",
                getNodeForSubscription(_subList, _sub3).delete());
        assertNotNull("Should still have been a node present for the deleted 3rd subscription",
                getNodeForSubscription(_subList, _sub3));

        SubscriptionNodeIterator iter = _subList.iterator();

        //verify the iterator returns the 1st subscriptions node
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub1, iter.getNode().getSubscription());

        //verify the iterator returns the 2nd subscriptions node
        assertTrue("Iterator should have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", _sub2, iter.getNode().getSubscription());

        //verify the iterator can no longer advance and does not return a subscription node
        assertFalse("Iterator should not have been able to advance", iter.advance());
        assertEquals("Iterator returned unexpected SubscriptionNode", null, iter.getNode());
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.subscription.SubscriptionList.SubscriptionNodeIterator

Copyright © 2018 www.massapicom. 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.