Lines Matching full:router
26 TEST(Router, AllowHeader) in TEST() argument
32 Router router; in TEST() local
40 router.validate(); in TEST()
41 EXPECT_EQ(router.findRoute(req).allowHeader, ""); in TEST()
42 EXPECT_EQ(router.findRoute(req).route.rule, nullptr); in TEST()
44 router.newRuleTagged<getParameterTag(url)>(std::string(url)) in TEST()
46 router.validate(); in TEST()
47 EXPECT_EQ(router.findRoute(req).allowHeader, "GET"); in TEST()
48 EXPECT_NE(router.findRoute(req).route.rule, nullptr); in TEST()
51 EXPECT_EQ(router.findRoute(patchReq).route.rule, nullptr); in TEST()
53 router.newRuleTagged<getParameterTag(url)>(std::string(url)) in TEST()
55 router.validate(); in TEST()
56 EXPECT_EQ(router.findRoute(req).allowHeader, "GET, PATCH"); in TEST()
57 EXPECT_NE(router.findRoute(req).route.rule, nullptr); in TEST()
58 EXPECT_NE(router.findRoute(patchReq).route.rule, nullptr); in TEST()
61 TEST(Router, OverlapingRoutes) in TEST() argument
76 Router router; in TEST() local
79 router.newRuleTagged<getParameterTag("/foo/<str>")>("/foo/<str>")( in TEST()
81 router.newRuleTagged<getParameterTag("/foo")>("/foo")(fooCallback); in TEST()
82 router.validate(); in TEST()
92 router.handle(req, asyncResp); in TEST()
97 TEST(Router, 404)
107 Router router; variable
115 router.newRuleTagged<getParameterTag(url)>("/foo/<path>")
117 router.validate();
122 router.handle(req, asyncResp);
127 TEST(Router, 405)
138 Router router; variable
146 router.newRuleTagged<getParameterTag(url)>(std::string(url))
148 router.newRuleTagged<getParameterTag(url)>("/foo/<path>")
150 router.validate();
155 router.handle(req, asyncResp);