Package org.jivesoftware.smackx.bytestreams.ibb.packet

Examples of org.jivesoftware.smackx.bytestreams.ibb.packet.Open


            .a("sid", "i781hf64")
            .a("stanza", "iq")
            .asString(outputProperties);
       
        OpenIQProvider oip = new OpenIQProvider();
        Open open = (Open) oip.parseIQ(getParser(control));
       
        assertEquals(StanzaType.IQ, open.getStanza());
    }
View Full Code Here


            .a("sid", "i781hf64")
            .a("stanza", "message")
            .asString(outputProperties);
       
        OpenIQProvider oip = new OpenIQProvider();
        Open open = (Open) oip.parseIQ(getParser(control));
       
        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }
View Full Code Here

        // initialize InBandBytestreamManager to get the InitiationListener
        byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);

        // create a In-Band Bytestream open packet
        initBytestream = new Open(sessionID, blockSize);
        initBytestream.setFrom(initiatorJID);
        initBytestream.setTo(targetJID);

        incrementingSequence = new Verification<Data, IQ>() {
View Full Code Here

        // initialize InBandBytestreamManager to get the InitiationListener
        byteStreamManager = InBandBytestreamManager.getByteStreamManager(connection);

        // create a In-Band Bytestream open packet with message stanza
        initBytestream = new Open(sessionID, blockSize, StanzaType.MESSAGE);
        initBytestream.setFrom(initiatorJID);
        initBytestream.setTo(targetJID);

        incrementingSequence = new Verification<Message, IQ>() {
View Full Code Here

*/
public class OpenTest {

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments1() {
        new Open(null, 1);
    }
View Full Code Here

        new Open(null, 1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments2() {
        new Open("", 1);
    }
View Full Code Here

        new Open("", 1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotInstantiateWithInvalidArguments3() {
        new Open("sessionID", -1);
    }
View Full Code Here

        new Open("sessionID", -1);
    }

    @Test
    public void shouldSetIQStanzaAsDefault() {
        Open open = new Open("sessionID", 4096);
        assertEquals(StanzaType.IQ, open.getStanza());
    }
View Full Code Here

        assertEquals(StanzaType.IQ, open.getStanza());
    }

    @Test
    public void shouldUseMessageStanzaIfGiven() {
        Open open = new Open("sessionID", 4096, StanzaType.MESSAGE);
        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }
View Full Code Here

        assertEquals(StanzaType.MESSAGE, open.getStanza());
    }

    @Test
    public void shouldBeOfIQTypeSET() {
        Open open = new Open("sessionID", 4096);
        assertEquals(IQ.Type.SET, open.getType());
    }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smackx.bytestreams.ibb.packet.Open

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.