public async Task Should_Not_Substitue_Existing_Operation_Id_If_Context_Contains_Null() { OperationIdContext.Set("test"); var context = new MockOwinContext(); var collector = new OperationIdCollectingMiddleware(); var sut = new RestoreOperationIdContextMiddleware(collector); await sut.Invoke(context); collector.OperationIdFromAmbientContext.Should().Be("test"); }
public void Can_Set_Context() { OperationIdContext.Set("test"); OperationIdContext.Get().Should().Be("test"); }