public void TestInitialize()
{
windsorContainer = new WindsorContainer()
.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
.Register(
Component.For<ServiceHostListener>(),
Component.For<LoggingInterceptor>(),
Component.For<CallCountServiceBehavior>(),
Component.For<UnitOfworkEndPointBehavior>(),
Component.For<NetDataContractFormatBehavior>(),
Component.For<IOperations>().ImplementedBy<Operations>()
.Named("Operations")
.Interceptors(InterceptorReference.ForType<LoggingInterceptor>()).Anywhere
.DependsOn(new { number = 42 })
.AsWcfService(new DefaultServiceModel().AddEndpoints(
WcfEndpoint.BoundTo(new NetTcpBinding{PortSharingEnabled = true })
.At("net.tcp://localhost/Operations")
)
)
);
LoggingInterceptor.Calls.Clear();
CallCountServiceBehavior.CallCount = 0;
client = ChannelFactory<IOperations>.CreateChannel(
new NetTcpBinding{PortSharingEnabled = true }, new EndpointAddress("net.tcp://localhost/Operations"));
}