Exemple #1
0
        public void ThrowsWhenMappingCannotBeFound()
        {
            // arrange
            service = new DetermineDestinationFromRebusConfigurationSection();

            // act
            // assert
            var exception = Assert.Throws <InvalidOperationException>(() => service.GetEndpointFor(typeof(string)));

            exception.Message.ShouldContain("System.String");
        }
Exemple #2
0
        public void CanDetermineSomeRandomMapping()
        {
            // arrange
            service = new DetermineDestinationFromRebusConfigurationSection();

            // act
            var endpointForSomeMessageType    = service.GetEndpointFor(typeof(SomeMessageType));
            var endpointForAnotherMessageType = service.GetEndpointFor(typeof(AnotherMessageType));

            // assert
            endpointForSomeMessageType.ShouldBe("some_message_endpoint");
            endpointForAnotherMessageType.ShouldBe("another_message_endpoint");
        }