Package com.pusher.client.util

Examples of com.pusher.client.util.DoNothingExecutor


    public void setUp() throws URISyntaxException, SSLException {
        when(factory.getChannelManager()).thenReturn(mockChannelManager);
        when(factory.newWebSocketClientWrapper(any(URI.class), any(WebSocketConnection.class)))
                .thenReturn(mockUnderlyingConnection);
        when(factory.getEventQueue()).thenReturn(new InstantExecutor());
        when(factory.getTimers()).thenReturn(new DoNothingExecutor());

        this.connection = new WebSocketConnection(URL, ACTIVITY_TIMEOUT, PONG_TIMEOUT, factory);
        this.connection.bind(ConnectionState.ALL, mockEventListener);
    }
View Full Code Here


        pusherOptions = new PusherOptions().setAuthorizer(mockAuthorizer).setEncrypted(false);

        connection = new WebSocketConnection(pusherOptions.buildUrl(API_KEY), ACTIVITY_TIMEOUT, PONG_TIMEOUT, factory);

        when(factory.getEventQueue()).thenReturn(new InstantExecutor());
        when(factory.getTimers()).thenReturn(new DoNothingExecutor());
        when(factory.newWebSocketClientWrapper(any(URI.class), any(WebSocketListener.class))).thenAnswer(new Answer<WebSocketClientWrapper>() {
            @Override
            public WebSocketClientWrapper answer(InvocationOnMock invocation) throws Throwable {
                URI uri = (URI) invocation.getArguments()[0];
                WebSocketListener proxy = (WebSocketListener) invocation.getArguments()[1];
View Full Code Here

TOP

Related Classes of com.pusher.client.util.DoNothingExecutor

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.