public void Setup() { _dbSetUpHelper = new DatabaseSetUpHelper(); _context = _dbSetUpHelper.GetContext(); _httpContextHelper = new HttpContextHelper(); _choresRepository = new ChoresRepository(_context); _flatRepository = new FlatRepository(_context); _userRepository = new UserRepository(_context); _mapperHelper = new MapperHelper(); var mapper = _mapperHelper.GetMapper(); var httpContext = _httpContextHelper.GetHttpContext(); var objClaim = _httpContextHelper.GetClaimsIdentity(); _choreController = new ChoreController(_choresRepository, _flatRepository, _userRepository, mapper) { ControllerContext = new ControllerContext { HttpContext = httpContext } }; httpContext.User = new ClaimsPrincipal(objClaim); }