Hello mockers :) (I'm pretty new into this, so please bear with me if this is basic.)
I'm trying to test my UserControl.Page_Load(), and need to mock the Page property (inherited from System.Web.UI.UserControl). Snippets:
.
string allsites = Page.Request.QueryString["sites"];
.
.
if (!Page.ClientScript.IsStartupScriptRegistered(typeof(Page), "Startup"))
Page.ClientScript.RegisterStartupScript(typeof(Page), "SearchBoxStartup", jsStartup, true);
I've read about similar issues here at the forum, and have tried several suggestions with no luck. When I'm debugging my test, and debugging into the Page_Load, the Page property is always null.
Can anyone advice how to mock the Page property?
Thx in advance
JI