Created
March 23, 2011 02:04
-
-
Save tildedave/882486 to your computer and use it in GitHub Desktop.
Coerce an MVC ActionResult to a subclass as part of a unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static T IsResult<T>(ActionResult result) where T : ActionResult | |
{ | |
Assert.IsInstanceOf<T>(result); | |
return (T)result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment