public void Should_map_assembly() { // align // act MessageMapper.RegisterMappingsFromAssembly(typeof(MessageMapperRegisteredCommand).Assembly); var name = MessageMapper.GetQueueName(typeof(MessageMapperRegisteredCommand)); var mapping = MessageMapper.GetMapping(typeof(TestCommand)); // assert name.Should().Be("awesome-queue"); mapping.GetType().Should().Be(typeof(TestCommandMapping)); }
public void Should_find_registered_mapping() { // align IMessageMapping testCommandMapping = new TestCommandMapping(); MessageMapper.RegisterMapping(typeof(RegisteredMessageMapping), testCommandMapping); // act var mapping = MessageMapper.GetMapping(typeof(RegisteredMessageMapping)); // assert mapping.GetType().Should().Be(typeof(TestCommandMapping)); }