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 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; }