Exemple #1
0
        public void CanBuildChannelFactory_Always_Returns_False()
        {
            HttpMessageHandlerBindingElement bindingElement = new HttpMessageHandlerBindingElement();

            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IReplyChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IReplySessionChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IRequestChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IRequestSessionChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IOutputChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IOutputSessionChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IInputChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IInputSessionChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IDuplexChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
            Assert.IsFalse(bindingElement.CanBuildChannelFactory <IDuplexSessionChannel>(MockBindingContext.Create()), "HttpMessageHandlerBindingElement.CanBuildChannelFactory should always return 'false'.");
        }
        public void HttpMessagePluginBindingElement_Method2()
        {
            var be = new HttpMessageHandlerBindingElement();

            Assert.IsFalse(be.CanBuildChannelFactory <IRequestChannel>(null));
        }