public void Should_handle_resolving_channels_from_registered_channel_factory_instances()
        {
            using (var container = new UnityContainer())
            {
                container.RegisterChannelFactoryInstance(typeof (ChannelFactory<IMockServiceClient>),
                                                         typeof (IMockServiceClient),
                                                         "client", _channelFactory);

                var channel = container.Resolve<IMockServiceClient>("client");
                Assert.NotNull(channel);
            }
        }
        public void Should_properly_close_the_client_channel()
        {
            IMockServiceClient channel = null;
            using (var container = new UnityContainer())
            {
                container.RegisterChannelFactoryInstance(typeof (ChannelFactory<IMockServiceClient>),
                                                         typeof (IMockServiceClient),
                                                         "client", _channelFactory);

                channel = container.Resolve<IMockServiceClient>("client");
                channel.Open();
            }
            Assert.NotEqual(CommunicationState.Opened, channel.State);
        }