예제 #1
0
        public void WithRouteSpecified_ReturnsRouteAsPath()
        {
            var trigger = new HttpTriggerAttribute("get")
            {
                Route = "/mypath"
            };

            Assert.Equal("/mypath", trigger.GetRouteOrDefault());
        }
예제 #2
0
        public void WithEmptyDefaultSupplied_Throws(string defaultRoute)
        {
            var trigger = new HttpTriggerAttribute("get");

            Assert.Throws <ArgumentException>("defaultRoute", () => trigger.GetRouteOrDefault(defaultRoute));
        }
예제 #3
0
        public void WithNoRouteSpecified_AndSpecifiedDefault_ReturnsSpecifedDefailtRoute()
        {
            var trigger = new HttpTriggerAttribute("get");

            Assert.Equal("/api", trigger.GetRouteOrDefault("api"));
        }
예제 #4
0
        public void WithNoRouteSpecified_ReturnsDefaultRoute()
        {
            var trigger = new HttpTriggerAttribute("get");

            Assert.Equal("/", trigger.GetRouteOrDefault());
        }