Dynamic Types Make Unit Testing JSON in ASP.NET MVC a Breeze!(www.rantdriven.com)
submitted by
jeffrymorris(185) 1 year, 7 months ago
The new dynamic type in C# 4 was mainly added to offer simpler creation of objects using reflection and the ability to treat objects as they are no matter where they were created: COM interop, DLR, etc. It basically defers static typing until runtime. The object itself is statically typed, however the compiler bypasses compile-time static type checking until runtime. One place where this kind of late bound typing is really useful is unit testing ASP.NET MVC action methods that return JSON via JsonResult.
|category: Unit Testing
|Views: 16
tags:
Testing another
Everyones tags:
Your Tags: