ApplicationInsights.OwinExtensions.Tests.RestoreOperationIdContextMiddlewareTests.Can_Restore_Operation_Context_Id_From_Owin_Context C# (CSharp) Method

Can_Restore_Operation_Context_Id_From_Owin_Context() private method

private Can_Restore_Operation_Context_Id_From_Owin_Context ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task Can_Restore_Operation_Context_Id_From_Owin_Context()
        {
            var context = new MockOwinContext();
            context.Set(Consts.OperationIdContextKey, "test");

            var collector = new OperationIdCollectingMiddleware();
            var sut = new RestoreOperationIdContextMiddleware(collector);

            await sut.Invoke(context);

            collector.OperationIdFromAmbientContext.Should().Be("test");
        }