public void Should_map_assembly() { // align // act MessageMapper.RegisterMappingsFromAssembly(typeof(MessageMapperRegisteredCommand).Assembly); var name = MessageMapper.GetQueueName(typeof(MessageMapperRegisteredCommand)); // assert name.Should().Be("awesome-queue"); }
public void Should_find_registered_mapping_queue_name() { // align IMessageMapping queue = new TestCommandMapping(); MessageMapper.RegisterMapping(typeof(RegisteredMessageMapping), queue); // act var queueName = MessageMapper.GetQueueName(typeof(RegisteredMessageMapping)); // assert queueName.Should().Be(queue.QueueName); }
public void Should_find_registered_mapping() { // align const string name = "queue"; MessageMapper.RegisterMapping(typeof(RegisteredMessageMapping), name); // act var queueName = MessageMapper.GetQueueName(typeof(RegisteredMessageMapping)); // assert queueName.Should().Be(name); }
public void Should_throw_for_non_registered_message() { var action = new Func <string>(() => MessageMapper.GetQueueName(typeof(NotRegisteredMessage))); action.Invoking(m => m.Invoke()).Should().Throw <MessageMappingMissingException>(); }