@Test public void willCloseWebSocket() throws RemoteException { setupMockBoundMessengerService(); createObservableSendDataAndSubscribe("lets connect"); sendConnectionParamsFromServer(); setWebSocketConnectedState(true); observableWebSocketClient.closeConnection(); verify(observableWebSocketClient.okWebSocketClient).close(); }
@Override public void closeConnection() { if (okWebSocketClient != null && okWebSocketClient.isConnected()) { okWebSocketClient.close(); } super.closeConnection(); }
ObservableWebSocketClient extends ObservableMessengerClient { @Override public void closeConnection() { if (okWebSocketClient != null && okWebSocketClient.isConnected()) { okWebSocketClient.close(); } super.closeConnection(); } }
ObservableWebSocketClient extends ObservableMessengerClient { @Override public void closeConnection() { if (okWebSocketClient != null && okWebSocketClient.isConnected()) { okWebSocketClient.close(); } super.closeConnection(); } ObservableWebSocketClient(Context context, ComponentName serviceComponentName); }
ObservableWebSocketClient extends ObservableMessengerClient { @Override public void closeConnection() { if (okWebSocketClient != null && okWebSocketClient.isConnected()) { okWebSocketClient.close(); } super.closeConnection(); } ObservableWebSocketClient(Context context, ComponentName serviceComponentName); @Override Completable connect(); @Override boolean isConnected(); @Override Observable<String> sendMessage(final String message); @Override void closeConnection(); }
ObservableWebSocketClient extends ObservableMessengerClient { @Override public void closeConnection() { if (okWebSocketClient != null && okWebSocketClient.isConnected()) { okWebSocketClient.close(); } super.closeConnection(); } ObservableWebSocketClient(Context context, ComponentName serviceComponentName); @Override Completable connect(); @Override boolean isConnected(); @Override Observable<String> sendMessage(final String message); @Override void closeConnection();  }