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(); _assessmentRepo = new Continuum.Data.AssessmentRepo(_mockContainer); _teamRepo = new Continuum.Data.TeamRepo(_mockContainer); _dimensionRepo = new Data.DimensionRepo(_mockContainer); var identity = new System.Security.Principal.GenericIdentity("*****@*****.**"); var princpal = new System.Security.Principal.GenericPrincipal(identity, new string[] { }); Continuum.WebApi.Controllers.AssessmentController.CurrentUser = princpal; _assessmentController = new Continuum.WebApi.Controllers.AssessmentController(_assessmentRepo, _teamRepo, _dimensionRepo); _assessmentController.User = princpal; }
public GoalController(Data.GoalRepo goalRepository, Data.TeamRepo teamRepo, Data.DimensionRepo dimensionRepo) { _goalRepository = goalRepository; _teamRepo = teamRepo; _dimensionRepo = dimensionRepo; }