コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public void AddBindingParametersDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.AddBindingParameters(null, null, null, null);
 }
コード例 #4
0
 public void ValidateDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.Validate(null, null);
 }
コード例 #5
0
 public void ReleaseInstanceDoesNothing()
 {
     var provider = new WcfChannelInstanceProvider(null);
     provider.ReleaseInstance(null, null);
 }