I am trying to unit test message handlers for NServiceBus 4.0.4. The bus is configured to use JSON serializer in the application using the Configure.Serialization.Json();
method call.
Whenever I call the Test.Initialize()
method from the unit tests assembly I get the following exception: System.Configuration.ConfigurationErrorsException : Multiple serializers are not supported. Please make sure to only enable one
I tried calling Configure.Serialization.Json()
and Serializers.SetDefault<JsonSerialization>()
before calling the Test.Initialize()
method without any success.
Does anyone know what am I doing wrong? All examples I see on the internet do not mention any Configure
calls.