/// <summary> /// Causes the fake server to provide a response, which we expect to be passed to the /// state machine. /// </summary> internal void ProvideResponse(WatchResponseResult result) { // The response is opaque to WatchStream, but we want to make sure the state machine gets the var response = new ListenResponse { TargetChange = new TargetChange { TargetIds = { _responseIndex++ } } }; _currentResponseList.Add(() => response); _watchState.ExpectResponse(response, result); }
/// <summary> /// Causes the fake server to provide a response, which we expect to be passed to the /// state machine. The resume token for the state machine is set to <paramref name="resumeToken"/> for /// requests which occur after this point. /// </summary> internal void ProvideResponse(WatchResponseResult result, ByteString resumeToken) { _watchState.AddResumeToken(_responseIndex, resumeToken); ProvideResponse(result); }