Technorati Tags: Unit Testing,ASP.NET,MVC,VS 2010 Story: I want to write a unit test to ensure that the Authorize attribute is applied to a controller ActionResult or ViewResult so that security is tested. Here is the test: Unit Test [TestMethod] public void PreviousSiteUserConversion_Authorization_Attributes_Have_Been_Applied() { // Arrange MethodInfo varietalMethod = typeof(AdminController).GetMethod("PreviousSiteUserConversion", new Type[] { }); // [...]
Archive for April 25th, 2010
Unit Test Authorize Attribute
Sunday, Apr 25th, 2010 by karlz | 1 Comments
Filed under: Technology | Tags: ASP.NET, MVC, Unit Testing, VS 2010
Filed under: Technology | Tags: ASP.NET, MVC, Unit Testing, VS 2010