Package com.sun.xml.ws.rx.rm.protocol.wsrm200502

Examples of com.sun.xml.ws.rx.rm.protocol.wsrm200502.Identifier


    }
   
    @Test
    public void testUpdateSourceSequence() throws SQLException {
        SourceSequence seq = control.createMock(SourceSequence.class);
        Identifier sid1 = new Identifier();
        sid1.setValue("sequence1");
        EasyMock.expect(seq.getIdentifier()).andReturn(sid1);
        EasyMock.expect(seq.getExpires()).andReturn(null);
        EasyMock.expect(seq.getOfferingSequenceIdentifier()).andReturn(null);
        EasyMock.expect(seq.getEndpointIdentifier()).andReturn(CLIENT_ENDPOINT_ID);
       
View Full Code Here


    }

    @Test
    public void testGetDestinationSequences() throws SQLException, IOException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        Collection<DestinationSequence> seqs =
            store.getDestinationSequences("unknown", ProtocolVariation.RM10WSA200408);
        assertEquals(0, seqs.size());
       
View Full Code Here

    }

    @Test
    public void testGetSourceSequences() throws SQLException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        Collection<SourceSequence> seqs =
            store.getSourceSequences("unknown", ProtocolVariation.RM10WSA200408);
        assertEquals(0, seqs.size());
       
View Full Code Here

    }

    @Test
    public void testGetDestinationSequence() throws SQLException, IOException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        DestinationSequence seq =
            store.getDestinationSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
        assertNull(seq);

        try {
            sid1 = setupDestinationSequence("sequence1");
View Full Code Here

    }

    @Test
    public void testGetSourceSequence() throws SQLException, IOException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        SourceSequence seq =
            store.getSourceSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
        assertNull(seq);
       
        try {
            sid1 = setupSourceSequence("sequence1");
View Full Code Here

    }

    @Test
    public void testGetMessages() throws SQLException, IOException {
       
        Identifier sid1 = new Identifier();
        sid1.setValue("sequence1");
        Identifier sid2 = new Identifier();
        sid2.setValue("sequence2");
       
        Collection<RMMessage> out = store.getMessages(sid1, true);
        assertEquals(0, out.size());
        Collection<RMMessage> in = store.getMessages(sid1, false);
        assertEquals(0, out.size());
View Full Code Here

    }
   
    private Identifier setupDestinationSequence(String s) throws IOException, SQLException {
        DestinationSequence seq = control.createMock(DestinationSequence.class);
       
        Identifier sid = new Identifier();
        sid.setValue(s);
        EndpointReferenceType epr = RMUtils.createAnonymousReference();
       
        SequenceAcknowledgement ack = ack1;
        Long lmn = ZERO;
        
View Full Code Here

        return sid;
    }
   
    private Identifier setupSourceSequence(String s) throws SQLException {
        SourceSequence seq = control.createMock(SourceSequence.class);       
        Identifier sid = new Identifier();
        sid.setValue(s);     
           
        Date expiry = null;
        Identifier osid = null;
        Long cmn = ONE;
        boolean lm = false;
       
        if ("sequence2".equals(s)) {
            expiry = new Date(System.currentTimeMillis() + 3600 * 1000);
            osid = new Identifier();
            osid.setValue("offeringSequence");
            cmn = TEN;
            lm = true;           
        }
       
        EasyMock.expect(seq.getIdentifier()).andReturn(sid);
View Full Code Here

       
        return sid;
    }

    private void verifyDestinationSequence(String s, DestinationSequence seq) {
        Identifier sid = seq.getIdentifier();
        assertNotNull(sid);
        assertEquals(s, sid.getValue());
        if ("sequence1".equals(s)) {
            assertEquals(0, seq.getLastMessageNumber());
            SequenceAcknowledgement sa = seq.getAcknowledgment();
            assertNotNull(sa);
            verifyAcknowledgementRanges(sa.getAcknowledgementRange(), new long[]{1, 1});
View Full Code Here

            verifyAcknowledgementRanges(sa.getAcknowledgementRange(), new long[]{1, 1, 3, 10});
        }
    }
   
    private void verifySourceSequence(String s, SourceSequence seq) {
        Identifier sid = seq.getIdentifier();
        assertNotNull(sid);
        assertEquals(s, sid.getValue());
        if ("sequence1".equals(s)) {
            assertNull(seq.getExpires());
            assertEquals(1, seq.getCurrentMessageNr());
            assertFalse(seq.isLastMessage());
        } else if ("sequence2".equals(s)) {
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.rx.rm.protocol.wsrm200502.Identifier

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.