Skip to content

Commit 414cee4

Browse files
fix unit tests
1 parent a277e1f commit 414cee4

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

TransactionProcessor/Bootstrapper/OperatorRegistry.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,17 @@ public OperatorRegistry()
4949
this.For<IOperatorProxy>().Add<PataPawaPrePayProxy>().Named("PataPawaPrePay").Singleton();
5050
this.For<IOperatorProxy>().Add<VoucherManagementProxy>().Named("Voucher").Singleton();
5151

52-
var loggingConfig = Startup.Container.GetInstance<RequestResponseMiddlewareLoggingConfig>();
53-
this.AddTransient<Func<PataPawaPostPayServiceClient, String,String, IPataPawaPostPayService>>(context => (client,clientName,
54-
url) => {
55-
client.Endpoint.SetTraceLogging(clientName, loggingConfig);
56-
IPataPawaPostPayService channel =
57-
client.ChannelFactory.CreateChannel(new EndpointAddress(url));
58-
return channel;
59-
});
52+
53+
this.AddTransient<Func<PataPawaPostPayServiceClient, String, String, IPataPawaPostPayService>>(context =>
54+
(client, clientName,
55+
url) =>
56+
{
57+
var loggingConfig = Startup.Container.GetInstance<RequestResponseMiddlewareLoggingConfig>();
58+
client.Endpoint.SetTraceLogging(clientName, loggingConfig);
59+
IPataPawaPostPayService channel =
60+
client.ChannelFactory.CreateChannel(new EndpointAddress(url));
61+
return channel;
62+
});
6063

6164

6265
this.AddTransient<Func<String, IOperatorProxy>>(context => operatorIdentifier => {

TransactionProcessor/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,15 @@ public void ConfigureContainer(ServiceRegistry services) {
161161

162162
ConfigurationReader.Initialise(Startup.Configuration);
163163

164+
services.IncludeRegistry<MiscRegistry>();
164165
services.IncludeRegistry<MediatorRegistry>();
165166
services.IncludeRegistry<RepositoryRegistry>();
166167
services.IncludeRegistry<MiddlewareRegistry>();
167168
services.IncludeRegistry<DomainServiceRegistry>();
168169
services.IncludeRegistry<OperatorRegistry>();
169170
services.IncludeRegistry<ClientRegistry>();
170171
services.IncludeRegistry<DomainEventHandlerRegistry>();
171-
services.IncludeRegistry<MiscRegistry>();
172+
172173
services.AddMemoryCache();
173174

174175
TypeProvider.LoadDomainEventsTypeDynamically();

0 commit comments

Comments
 (0)