title: How do I mock/fake the session object in ASP.Net Web forms?
body: <p>Is there a way to mock/fake the session object in ASP.Net Web forms when creating unit tests?</p>
  
  <p>I am currently storing user details in a session variable which is accessed by my business logic. </p>
  
  <p>When testing my business logic in isolation, the session is not available. This seems to indicate a bad design (though I'm not sure). Should the business logic layer be accessing session variables in the first place?</p>
  
  <p>If so, then how would I go about swapping the user details with a fake object for testing?</p>