Thursday, April 29, 2010
by
Just* Team
|
Go comment!
In this post , I will cover a test code that will mock the various elements needed to complete a HTTP page request and assert the expected page cycle steps. To begin, i have a simple enumeration that has my predefined page steps:
- public enum PageStep
- {
- PreInit,
- Load,
- PreRender,
- UnLoad
- }
Once doing so, i first created the page object [not mocking].
Here, our target is to fire up the page process through ProcessRequest call, now if we take a look inside the method with reflector.net, the call trace will go like : ProcessRequest –> ProcessRequestWithNoAssert –>...