public void WillApplyChannelFactoryAwareExtensionsWhenChannelCreated()
{
windsorContainer.Register(
Component.For<ChannelFactoryListener>(),
Component.For<IOperations>()
.Named("operations")
.AsWcfClient(new DefaultClientModel()
{
Endpoint = WcfEndpoint
.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
.At("net.tcp://localhost/Operations")
})
);
CollectionAssert.IsEmpty(ChannelFactoryListener.ChannelsCreated);
var client = windsorContainer.Resolve<IOperations>("operations");
Assert.AreEqual(1, ChannelFactoryListener.ChannelsCreated.Count);
Assert.AreEqual(1, ChannelFactoryListener.ChannelsAvailable.Count);
CollectionAssert.AreEqual(new[] { client }, ChannelFactoryListener.ChannelsAvailable);
}