Skip to content
This repository was archived by the owner on May 19, 2024. It is now read-only.
This repository was archived by the owner on May 19, 2024. It is now read-only.

cannot correctly validate routes that are working in MVC 5.2.3? #74

@kimballjohnson

Description

@kimballjohnson

I'm not getting very many valid tests for routes copied from our working application. Here's one:

_routes.MapRoute("TransferInfo",   "PublicSite/TransferInformation/{AcademicYearId}/{InstitutionId}/{OtherInstitutionId}/{ReportType}/{SelectionType}/{ReportId}", 
new { controller = "PublicSite", action = "TransferInformation", AcademicYearId = UrlParameter.Optional, InstitutionId = UrlParameter.Optional, OtherInstitutionId = UrlParameter.Optional, ReportType = UrlParameter.Optional, SelectionType = UrlParameter.Optional, ReportId = UrlParameter.Optional }, 
null,
new string[1] { "assistv2.Controllers" });

RouteAssert.HasRoute(_routes, "Publicsite/TransferInformation/67/121");

But there are others. For example, if I create an 'IgnoreRoute', RouteAssert does not recognize it unless the RouteCollection is defined within the unit test method and the IgnoreRoute method is called there as well.

Am I missing something?

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions