public void WillApplyExlpicitScopedKeyEndpointBehaviors()
{
CallCountEndpointBehavior.CallCount = 0;
windsorContainer.Register(
Component.For<CallCountEndpointBehavior>()
.Attribute("scope").Eq(WcfExtensionScope.Explicit)
.Named("specialBehavior")
.LifeStyle.Transient,
Component.For<IOperationsEx>()
.Named("operations")
.AsWcfClient(new DefaultClientModel()
{
Endpoint = WcfEndpoint
.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
.At("net.tcp://localhost/Operations/Ex")
.AddExtensions("specialBehavior")
})
);
var client = windsorContainer.Resolve<IOperationsEx>("operations");
client.Backup(new Dictionary<string, object>());
Assert.AreEqual(1, CallCountEndpointBehavior.CallCount);
}