Pro ASP.NET MVC 4 by Adam Freeman

Pro ASP.NET MVC 4 by Adam Freeman

Author:Adam Freeman [Freeman, Adam]
Language: eng
Format: epub, pdf
Tags: Computers, Programming Languages, Programming, Microsoft Programming, C#
ISBN: 9781430242369
Publisher: Apress
Published: 2012-12-20T05:00:00+00:00


UNIT TEST: TESTING OUTGOING URLS

The simplest way to test outgoing URL generation is to use the static UrlHelper.GenerateUrl method, which has parameters for all of the different ways that you can direct the route generation—for example, by specifying the route name, controller, action, segment values, and so on. Here is a test method that verifies URL generation against the route defined in Listing 14-3, which we added to the RouteTests.cs file in the test project (because it uses the test utility methods we defined in the previous chapter):

...

[TestMethod]

public void TestIncomingRoutes() {

// ...code deleted to prevent test failure...

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.