I'm using ASP.NET to build an application and the latest version of NUNIT framework to test it. I'm constructing a User Control to build a custom menu. That control at some point checks whehter a specific object exists in the Session Collection or not to add some elements to the menu.
The exact functionality it provides is this: if the registered user is a regular user display the regular set of links, if the registered user is a administrator add extra links to the already displayed links. The control works as expected.
My problem:
I want to take the control outside the web application, and test it separately inside the NUNIT testing framework. My only concern is that it relies on the existence of the Session object. I don't know how to simulate it inside a nunit test method, if its possible or are there alternative solutions I haven't thought of.