Пример #1
0
        public void GetRouteUrl_returns_correct_Url_for_attribute_routes()
        {
            var url = _helper.GetRouteUrl((FakeController c) => c.GetUpperrcase("test"));

            Assert.AreEqual("uppercase?str=test", url);
            url = _helper.GetRouteUrl((FakeController c) => c.GetLowercase("test"));
            Assert.AreEqual("lowercase/test", url);
            url = _helper.GetRouteUrl((FakeController c) => c.GetValues(new[] { "test1", "test2" }));
            var x = Get <string[]>(url);

            url = _helper.GetRouteUrl((FakeController c) => c.GetPersonName(new Person {
                Name = "User", Age = 23
            }));
        }