public void Setup() { var config = new HttpConfiguration(); config.Routes.MapHttpRoute( name: "Default", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }); _request = new HttpRequestMessage(HttpMethod.Get, "http://localhost"); _request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; _request.Properties[HttpPropertyKeys.HttpRouteDataKey] = new HttpRouteData(new HttpRoute()); _mockContainer = new Data.Mocks.MockContainer(); _teamRepo = new Data.TeamRepo(_mockContainer); _goalRepo = new Data.GoalRepo(_mockContainer); _dimensionRepo = new Data.DimensionRepo(_mockContainer); var identity = new System.Security.Principal.GenericIdentity("*****@*****.**"); var princpal = new System.Security.Principal.GenericPrincipal(identity, new string[] { }); _controller = new GoalController(_goalRepo, _teamRepo, _dimensionRepo); _controller.User = princpal; _controller.Request = _request; }
public void Setup() { var config = new HttpConfiguration(); config.Routes.MapHttpRoute( name: "Default", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }); _request = new HttpRequestMessage(HttpMethod.Get, "http://localhost"); _request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; _request.Properties[HttpPropertyKeys.HttpRouteDataKey] = new HttpRouteData(new HttpRoute()); _mockContainer = new Data.Mocks.MockContainer(); _teamRepo = new Data.TeamRepo(_mockContainer); _goalRepo = new Data.GoalRepo(_mockContainer); _dimensionRepo = new Data.DimensionRepo(_mockContainer); var identity = new System.Security.Principal.GenericIdentity("*****@*****.**"); var princpal = new System.Security.Principal.GenericPrincipal(identity, new string[] { }); _controller = new GoalController(_goalRepo, _teamRepo, _dimensionRepo); _controller.User = princpal; _controller.Request = _request; }
public DimensionRepo(Data.IContinuumDataContainer container) { _container = container; }
public DimensionRepo() { _container = new ContinuumDataContainer(); }
public GoalRepo(Data.IContinuumDataContainer container) { _container = container; }
public GoalRepo(Data.IContinuumDataContainer container) { _container = container; }
public DimensionRepo(Data.IContinuumDataContainer container) { _container = container; }
public DimensionRepo() { _container = new ContinuumDataContainer(); }
public TeamRepo(IContinuumDataContainer container) { _container = container; }
public TeamRepo() { _container = new ContinuumDataContainer(); }
public TeamRepo(IContinuumDataContainer container) { _container = container; }
public TeamRepo() { _container = new ContinuumDataContainer(); }