ASP.net WebForms MVP: Testable WebForms

Hello World,I have been busy over the past month and a half trying to join the dots of relocating to my home town. Today, just out of interest I was searching for ways to make my ASP.net WebForms projects unit-testable. I had been able to figure out that I should encapsulate the data access, business logic et cetera to separate classes that could then be unit tested. The issue was how to automate testing of  caching, session and application based stuff as also code that depends on the ASP.net Page lifecycle (read the event chain).
One idea I had was to write mock objects (something similar to what is echoed on StackOverflow). On some further digging, I found this: ASP.net MVP Framework and the associated Code from Codeplex.
Here are some more resources on this topic:

  1. WebForms MVP Contrib Framework
  2. Getting Started with Inversion of Control and MVP
  3. MSDN Magazine on MVP design pattern
  4. StackOverflow discussion

The entire package is enticing enough to get my hands dirty. That obviously would follow once I settle down 🙂

Happy Coding,

Advertisements
Posted in ASP.NET, C#
2 comments on “ASP.net WebForms MVP: Testable WebForms
  1. ajithkkb says:

    Thanks Sudhashu!!!

  2. This is a nice article..Its easy to understand ..And this article is using to learn something about it..c#, dot.net, php tutorial, Ms sql serverThanks a lot..!ri70

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

  • Comic for July 25, 2017
    Dilbert readers - Please visit Dilbert.com to read this feature. Due to changes with our feeds, we are now making this RSS feed a link to Dilbert.com.
%d bloggers like this: