public void got_to_have_a_route_name() { var chain = new RoutedChain("foo"); //chain.RouteName = "bar"; chain.Route.AddHttpMethodConstraint("PUT"); var router = new MyJavascriptRouter(); Exception<ArgumentOutOfRangeException>.ShouldBeThrownBy(() => { router.Add(chain); }); }
public void got_to_have_a_route_name() { var chain = new RoutedChain("foo"); //chain.RouteName = "bar"; chain.Route.AddHttpMethodConstraint("PUT"); var router = new MyJavascriptRouter(); Exception <ArgumentOutOfRangeException> .ShouldBeThrownBy(() => { router.Add(chain); }); }
public void add_route_happy_path() { var chain = new RoutedChain("foo"); chain.RouteName = "bar"; chain.Route.AddHttpMethodConstraint("PUT"); var router = new MyJavascriptRouter(); router.Add(chain); var route = router.Routes().Single(); route.Name.ShouldBe("bar"); route.Method.ShouldBe("PUT"); route.Finder(null).ShouldBeTheSameAs(chain); }