Package org.apache.vysper.xmpp.server.s2s

Examples of org.apache.vysper.xmpp.server.s2s.XMPPServerConnectorRegistry.connect()


    private static final Stanza STANZA = XMPPCoreStanza.getWrapper(StanzaBuilder.createMessageStanza(FROM, TO, LANG,
            BODY).build());

    public void testRemoteServerError() throws Exception {
        XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
        Mockito.when(registry.connect(SERVER)).thenThrow(new RemoteServerNotFoundException());

        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);

        DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());
View Full Code Here


    public void testSuccessfulRelay() throws Exception {
        XMPPServerConnector connector = Mockito.mock(XMPPServerConnector.class);
       
        XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
        Mockito.when(registry.connect(SERVER)).thenReturn(connector);

        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);

        DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.