/** * Tests that updates that arrive before the end-marker are passed on as * updates, and that when the end-marker eventually arrives, open-finished * is triggered then. */ public void testUpdatesBeforeOpenFinishedStillTriggersOpenFinished() { halfOpen(); respondWithChannelId(); viewOpenListener.clear(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_UPDATE, WAVELET_ID); respondWithMarker(false); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_OPEN_FINISHED); }
/** * Tests that updates that arrive before the end-marker are passed on as * updates, and that when the end-marker eventually arrives, open-finished * is triggered then. */ public void testUpdatesBeforeOpenFinishedStillTriggersOpenFinished() { halfOpen(); respondWithChannelId(); viewOpenListener.clear(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_UPDATE, WAVELET_ID); respondWithMarker(false); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_OPEN_FINISHED); }
public void testOpenRpcOnFailureAndThenTerminationWithoutCloseTriggersOneFailureAndClose() { open(); viewOpenListener.clear(); terminateOpenRpcWithFailure("WAVE_SERVER_ERROR"); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); terminateOpenRpcWithError(); viewOpenListener.expectedNothing(); }
public void testOpenRpcTerminationAfterUpdatesAndCloseTriggersCloseCallback() { open(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.clear(); close(); // The service should cause the open rpc to terminate successfully. terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }
public void testCloseTriggersCloseCallback() { open(); viewOpenListener.clear(); close(); // The underlying service is expected to have the following behaviour. terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }
/** * Tests that closing the channel prevents updates that arrive later from * being passed to the channel listener. */ public void testCloseMasksFutureUpdatesFromOpenListener() { open(); close(); viewOpenListener.clear(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.expectedNothing(); }
public void testOpenRpcOnFailureAndThenTerminationWithoutCloseTriggersOneFailureAndClose() { open(); viewOpenListener.clear(); terminateOpenRpcWithFailure("WAVE_SERVER_ERROR"); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); terminateOpenRpcWithError(); viewOpenListener.expectedNothing(); }
public void testOpenRpcTerminationWithoutCloseTriggersFailureAndClose() { open(); viewOpenListener.clear(); terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }
public void testOpenRpcTerminationAfterUpdatesAndCloseTriggersCloseCallback() { open(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.clear(); close(); // The service should cause the open rpc to terminate successfully. terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }
public void testMultipleClose() { open(); viewOpenListener.clear(); close(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); close(); viewOpenListener.expectedNothing(); }
/** * Tests that an update with the end-marker triggers the open-finished * callback. */ public void testMarkerTriggersOpenFinished() { halfOpen(); respondWithChannelId(); viewOpenListener.clear(); respondWithMarker(false); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_OPEN_FINISHED); }
public void testMultipleClose() { open(); viewOpenListener.clear(); close(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); close(); viewOpenListener.expectedNothing(); }
/** * Tests that closing the channel prevents updates that arrive later from * being passed to the channel listener. */ public void testCloseMasksFutureUpdatesFromOpenListener() { open(); close(); viewOpenListener.clear(); respondWithEmptyUpdate(WAVELET_ID); viewOpenListener.expectedNothing(); }
public void testCloseTriggersCloseCallback() { open(); viewOpenListener.clear(); close(); // The underlying service is expected to have the following behaviour. terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }
/** * Tests that an update with the end-marker triggers the open-finished * callback. */ public void testMarkerTriggersOpenFinished() { halfOpen(); respondWithChannelId(); viewOpenListener.clear(); respondWithMarker(false); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_OPEN_FINISHED); }
public void testOpenRpcTerminationWithoutCloseTriggersFailureAndClose() { open(); viewOpenListener.clear(); terminateOpenRpcWithSuccess(); viewOpenListener.expectedCall(MockViewChannelListener.MethodCall.ON_CLOSED); }