private void SetupController() { _controller = new AnswerFooterController(_unitOfWork.Object); _user = new Mock <IPrincipal>(); _controller.User = _user.Object; _identity = _user.MockIdentity("1"); }
public void Setup() { _context = new iKnowContext(); _controller = new AnswerFooterController(new UnitOfWork(_context)); _currentUser = new Mock <IPrincipal>(); _controller.User = _currentUser.Object; _firstUserInDb = _context.Users.First(); _currentUser.MockIdentity(_firstUserInDb.Id); _contextAfterAction = new iKnowContext(); }