Search Results

Search found 1 results on 1 pages for 'rayray2030'.

Page 1/1 | 1 

  • How do you mock the session object collection using Moq

    - by rayray2030
    I am using shanselmann's MvcMockHelper class to mock up some HttpContext stuff using Moq but the issue I am having is being able to assign something to my mocked session object in my MVC controller and then being able to read that same value in my unit test for verification purposes. My question is how do you assign a storage collection to the mocked session object to allow code such as session["UserName"] = "foo" to retain the "foo" value and have it be available in the unit test.

    Read the article

1