public void WithRouteSpecified_ReturnsRouteAsPath() { var trigger = new HttpTriggerAttribute("get") { Route = "/mypath" }; Assert.Equal("/mypath", trigger.GetRouteOrDefault()); }
public void WithEmptyDefaultSupplied_Throws(string defaultRoute) { var trigger = new HttpTriggerAttribute("get"); Assert.Throws <ArgumentException>("defaultRoute", () => trigger.GetRouteOrDefault(defaultRoute)); }
public void WithNoRouteSpecified_AndSpecifiedDefault_ReturnsSpecifedDefailtRoute() { var trigger = new HttpTriggerAttribute("get"); Assert.Equal("/api", trigger.GetRouteOrDefault("api")); }
public void WithNoRouteSpecified_ReturnsDefaultRoute() { var trigger = new HttpTriggerAttribute("get"); Assert.Equal("/", trigger.GetRouteOrDefault()); }