public void GetInstanceGeneratesNewInstanceWithServer()
 {
     var invoker = new ActionInvoker();
     var provider = new WcfChannelInstanceProvider(invoker);
     var instance = provider.GetInstance(null, null);
     Assert.IsInstanceOf<WcfChannel>(instance);
     var channel = instance as WcfChannel;
     Assert.AreSame(invoker, channel.Invoker);
 }
 public void ApplyDispatchBehaviorAddsTheProvider()
 {
     // TODO: Figure out how to mock up the service host with endpoint dispatchers
     var listenerMock = new Mock<IChannelListener>();
     var channelDispatcher = new ChannelDispatcher(listenerMock.Object);
     var hostMock = new Mock<ServiceHostBase>();
     hostMock.Object.ChannelDispatchers.Add(channelDispatcher);
     var provider = new WcfChannelInstanceProvider(null);
     provider.ApplyDispatchBehavior(null, hostMock.Object);
 }
 public void AddBindingParametersDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.AddBindingParameters(null, null, null, null);
 }
 public void ValidateDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.Validate(null, null);
 }
 public void ReleaseInstanceDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.ReleaseInstance(null, null);
 }