use of org.jivesoftware.smack.c2s.internal.ModularXmppClientToServerConnectionInternal in project Smack by igniterealtime.
the class XmppWebSocketTransportModuleTest method lookupConnectionEndpointsTest.
@Test
public void lookupConnectionEndpointsTest() throws URISyntaxException {
XmppWebSocketTransportModuleDescriptor websocketTransportModuleDescriptor = getWebSocketDescriptor();
ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class);
XmppWebSocketTransportModule transportModule = new XmppWebSocketTransportModule(websocketTransportModuleDescriptor, connectionInternal);
XmppWebSocketTransportModule.XmppWebSocketTransport transport = transportModule.getTransport();
assertNotNull(transport.lookupConnectionEndpoints());
}
use of org.jivesoftware.smack.c2s.internal.ModularXmppClientToServerConnectionInternal in project Smack by igniterealtime.
the class WebSocketFactoryServiceTestUtil method createWebSocketTest.
public static void createWebSocketTest(Class<? extends AbstractWebSocket> expected) throws URISyntaxException {
WebSocketRemoteConnectionEndpoint endpoint = WebSocketRemoteConnectionEndpoint.from("wss://example.org");
ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class);
AbstractWebSocket websocket = WebSocketFactoryService.createWebSocket(endpoint, connectionInternal);
assertEquals(expected, websocket.getClass());
}
use of org.jivesoftware.smack.c2s.internal.ModularXmppClientToServerConnectionInternal in project Smack by igniterealtime.
the class Java11WebSocketFactoryTest method returnsNotNullTest.
public void returnsNotNullTest() {
WebSocketRemoteConnectionEndpoint endpoint = mock(WebSocketRemoteConnectionEndpoint.class);
ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class);
Java11WebSocket java11WebSocket = Java11WebSocketFactory.INSTANCE.create(endpoint, connectionInternal);
assertNotNull(java11WebSocket);
}
Aggregations