public void Should_not_add_routes_for_action_sources_that_do_not_apply() { AddRoute(AddActionSource(false), "fark1"); AddRoute(AddActionSource(true), "fark2"); _initializer.Initialize(_httpConfiguration); _routes.Count.ShouldEqual(1); _routes.First().RouteTemplate.ShouldEqual("fark2"); }
public void UseCustomName() { var controller = typeof(FromRouteAttr.UseCustomNameController); config.MapCodeRoutes(controller, new CodeRoutingSettings { RootOnly = true }); Assert.IsNotNull(routes.First().RouteTemplate.Contains("{b}")); }