示例#1
0
        public void GetStringWithRouteParameter(string id)
        {
            var route = RouteHelper.GetRoute <UnitTestController, Task <string> >(controller => controller.GetStringWithRouteParameter(id));

            route.Should().NotBeNull();
            var routeAsString = route.ToString();

            routeAsString.Should().Be($"/api/v1/UnitTest/{id}");
        }
示例#2
0
        public void SimpleGet(string id)
        {
            var route = RouteHelper.GetRoute <UnitTestController, Task <string> >(controller => controller.GetString(id));

            route.Should().NotBeNull();
            var routeAsString = route.ToString();

            routeAsString.Should().Be($"/api/v1/UnitTest?id={id}");
        }