* Clean up unnecessary workarounds on the build project.
* Remove the need to specify the content root relative to the solution
and use a solution based on an assembly level attribute on the test
assembly created at build time.
* Remove non parameterless constructors.
* Add support for creating specialized factories from the base factory
and keep track of "child" factories for disposal.
* Add support for creating clients that handle cookies and redirects
automatically.
* #4847 Fix MapAreaRoute override existing area constraint
Modify Test project
Modify web test routing
* wrong field tested
* IntRouteConstraint expected
* Default for area route on Travel area
* Removed commented code
simplify constraintsDictionary area assign
renamed test method
* test name
* renamedd test to MapAreaRoute_DoesNotReplaceValuesForAreaIfAlreadyPresentInConstraintsOrDefaults
This change removes the IActionContextAccessor as a dependency of
UrlHelper, and shifts UrlHelper to use a factory pattern. Consumers of
IUrlHelper should create an instance using the factory when needed.
This is the last part of MVC that has a dependency on IActionContext
accessor. As part of this change we no longer register it by default, and
treat it as an optional component.
This change resolves#3512 and #3636 by removing 'magic' link generation
and adding an extension method to add routes to areas correctly using the new
pattern. This is pretty much exactly the same as how MapWebApiRoute works.
For site authors, we recommend adding area-specific routes in a way that
includes a default AND constraint for the area. Put your most specific
(for link generation) routes FIRST.
Ex:
routes.MapRoute(
"Admin/{controller}/{action}/{id?}",
defaults: new { area = "Admin" },
constraints: new { area = "Admin" });
The bulk of the changes here are to tests that unwittingly relied on the
old behavior.
- remove useless `configuration` variables and `Configuration` instances
- remove "Review" code comment
- unintentionally included in commit 4b5dd19
- reduce repeated code in `TestHelper` for functional tests
- `CreateServer()` methods had duplicate code, an ambiguous match, and an odd order
- rename `GetTestConfiguration()` to `UseCultureReplacer()` in functional tests
1. Added support for Name in attribute routing. Name can be defined using [RouteAttribute]
and the different Http*Attributes, for example [HttpGet].
2. Names defined on actions always override names defined on the controller.
3. Actions with a non empty template don't inherit the name from the controller. The name
is only inherited from the controller when the action template is null or empty.
4. Multiple attribute routes with different templates and the same name are not allowed.