Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. var loginCtrl = CreateController();
  2. var mockSession = MockRepository.GenerateMock<HttpSessionStateBase>();
  3. var mockRequest = MockRepository.GenerateMock<HttpRequestBase>();
  4.  
  5. loginCtrl.HttpContext.BackToRecord();
  6. loginCtrl.HttpContext.Stub(c => c.Session).Return(mockSession);
  7. loginCtrl.HttpContext.Stub(c => c.Request).Return(mockRequest);
  8. loginCtrl.HttpContext.Replay();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement