public async Task publish_a_message_with_publish_options_should_send_a_command_to_the_message_transport() { await bus.Start(); var message = new CatEvent(); var options = new PublishOptions(); options.SetHeaders("name", "smokey"); options.SetHeaders("lives", "7"); await bus.Publish(message, options); await messageTransport.Received().Publish(message, bus.MessageTypeToNamePublishingEventMap[message.GetType()], options); }
public void ShouldSetOptions() { var sendOptions = new PublishOptions(); var key = "code"; var value = "abc"; sendOptions.SetHeaders(key, value); sendOptions.Headers[key].Should().Be(value); }
public void ShouldGetOptions() { var options = new PublishOptions(); var key = "code"; var value = "abc"; options.SetHeaders(key, value); var header = options.GetHeaders(); header[key].Should().Be(value); }