diff --git a/README.md b/README.md index fb2c352a..62d75273 100644 --- a/README.md +++ b/README.md @@ -109,11 +109,15 @@ public class MyServiceConfiguration : EndpointConfiguration this.SendFailedMessagesTo("error"); this.EnableInstallers(); - this.UseTransport(new RabbitMQTransport(Topology.Conventional, "host=localhost")); + /* + * Any NServiceBus suppported transport can be used. Tests in this + * repostory are using the LearningTransport for the setup simplicity + */ + this.UseTransport(new LearningTransport()); } } ``` -snippet source | anchor +snippet source | anchor Using the above approach can be problematic when configuration values need to be read from an external source, like for example a configuration file. If this is the case the same external configuration source, most of the times with different values, needs to be available in tests too. @@ -127,19 +131,23 @@ In case configuration values need to be passed to the endpoint configuration the ```cs public static class MyServiceConfigurationBuilder { - public static EndpointConfiguration Build(string endpointName, string rabbitMqConnectionString) + public static EndpointConfiguration Build(string endpointName) { var config = new EndpointConfiguration(endpointName); config.SendFailedMessagesTo("error"); config.EnableInstallers(); - config.UseTransport(new RabbitMQTransport(Topology.Conventional, rabbitMqConnectionString)); + /* + * Any NServiceBus suppported transport can be used. Tests in this + * repostory are using the LearningTransport for the setup simplicity + */ + config.UseTransport(new LearningTransport()); return config; } } ``` -snippet source | anchor +snippet source | anchor ### Define endpoints used in each test