public void Setup() { _mockContainer = new Data.Mocks.MockContainer(); _teamRepo = new Continuum.Data.TeamRepo(_mockContainer); var identity = new System.Security.Principal.GenericIdentity("*****@*****.**"); _currentUser = new System.Security.Principal.GenericPrincipal(identity, new string[] { }); WebApi.Controllers.UserController.CurrentUser = _currentUser; _controller = new WebApi.Controllers.UserController(_teamRepo); _controller.User = _currentUser; }
public void Setup() { _mockContainer = new Data.Mocks.MockContainer(); _teamRepo = new Continuum.Data.TeamRepo(_mockContainer); var identity = new System.Security.Principal.GenericIdentity("*****@*****.**"); _currentUser = new System.Security.Principal.GenericPrincipal(identity, new string[] { }); WebApi.Controllers.UserController.CurrentUser = _currentUser; _controller = new WebApi.Controllers.UserController(_teamRepo); _controller.User = _currentUser; }