Example #1
0
        public void RequestUriParameterBinding_AppliesTo_IsFalseWithInvalidParameterName()
        {
            this.parameterName = "invalid";

            var r = RequestUriParameterBinding.AppliesTo(this.descriptor.Object);

            Assert.IsFalse(r);
        }
Example #2
0
        public void Setup()
        {
            this.parameterName = "requestUri";
            this.parameterType = typeof(Uri);
            this.descriptor    = new Mock <HttpParameterDescriptor>();
            this.actionContext = ContextUtil.CreateActionContext();
            this.binding       = new RequestUriParameterBinding(this.descriptor.Object);

            this.descriptor.SetupGet(x => x.ParameterName).Returns(() => this.parameterName);
            this.descriptor.SetupGet(x => x.ParameterType).Returns(() => this.parameterType);
        }
Example #3
0
        public void RequestUriParameterBinding_AppliesTo_IsTrueWithDefaultSetup()
        {
            var r = RequestUriParameterBinding.AppliesTo(this.descriptor.Object);

            Assert.IsTrue(r);
        }