public async Task when_executed_with_context_containing_no_message_metadata_it_should_skip() { var sut = new ExtractRelationMetadataStep(); var context = new MessageHandlingContext(); await sut.Execute(context); context.CorrelationId.Should().BeNull("this header not present"); }
public async Task when_executed_with_context_containing_message_metadata_with_missing_causation_id_it_should_skip() { var sut = new ExtractRelationMetadataStep(); var context = new MessageHandlingContext { Metadata = new Dictionary <string, string>() }; await sut.Execute(context); context.CausationId.Should().BeNull("this header not present"); }
public async Task when_executed_with_context_containing_causation_id_within_broker_message_metadata_it_should_store_it_in_context() { var sut = new ExtractRelationMetadataStep(); var context = new MessageHandlingContext(); const string expectedCausationId = "expected"; context.Metadata = new Dictionary <string, string> { { VentureApi.Headers.CausationId, expectedCausationId } }; await sut.Execute(context); context.CausationId.Should().Be(expectedCausationId, "this header should be copied"); }