public async Task OnFrameReceivedAsync_ShouldExecuteHandlerAction() { var context = new TestHandlerContext(); var frame = new Frame(ReadOnlySequence <byte> .Empty, new TestMessageMetadata(1, 0)); await _dispatcher.OnFrameReceivedAsync(in frame, context); context.VerifyAbort(); }
public async Task OnFrameReceivedAsync_ShouldNotExecuteHandlerAction_OnConnectionClosed() { var frame = new Frame(ReadOnlySequence <byte> .Empty, new TestMessageMetadata(1, 0)); var context = new TestHandlerContext(); context.Close(); Assert.Equal(DispatchResult.Cancelled, await _dispatcher.OnFrameReceivedAsync(in frame, context)); context.VerifyNotAborted(); }