public GoalLogic(Data.GoalRepo goalRepository, Data.DimensionRepo dimensionRepo, Logic.TeamLogic teamLogic, System.Security.Principal.IPrincipal principal)
     : base(principal)
 {
     _goalRepository = goalRepository;
     _teamLogic = teamLogic;
     _dimensionRepo = dimensionRepo;
 }
        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 GoalLogic(Data.GoalRepo goalRepository, Data.DimensionRepo dimensionRepo, Logic.TeamLogic teamLogic, System.Security.Principal.IPrincipal principal)
     : base(principal)
 {
     _goalRepository = goalRepository;
     _teamLogic      = teamLogic;
     _dimensionRepo  = dimensionRepo;
 }
        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 AssessmentLogic(Data.AssessmentRepo assessmentRepo, Data.TeamRepo teamRepo, Data.DimensionRepo dimensionRepo, System.Security.Principal.IPrincipal principal)
            : base(principal)
        {
            if (assessmentRepo == null) throw new ArgumentException("Value cannot be null", "assessmentRepo");
            if (teamRepo == null) throw new ArgumentException("Value cannot be null", "teamRepo");
            if (dimensionRepo == null) throw new ArgumentException("Value cannot be null", "dimensionRepo");

            _assessmentRepo = assessmentRepo;
            _teamRepo = teamRepo;
            _dimensionRepo = dimensionRepo;
        }
        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();
            _teamRepository = new Data.TeamRepo(_mockContainer);
            _dimensionRepo  = new Data.DimensionRepo(_mockContainer);
            _assessmentRepo = new Data.AssessmentRepo(_mockContainer);
        }
        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();
            _teamRepository = new Data.TeamRepo(_mockContainer);
            _dimensionRepo = new Data.DimensionRepo(_mockContainer);
            _assessmentRepo = new Data.AssessmentRepo(_mockContainer);
        }
Example #8
0
        public AssessmentLogic(Data.AssessmentRepo assessmentRepo, Data.TeamRepo teamRepo, Data.DimensionRepo dimensionRepo, System.Security.Principal.IPrincipal principal)
            : base(principal)
        {
            if (assessmentRepo == null)
            {
                throw new ArgumentException("Value cannot be null", "assessmentRepo");
            }
            if (teamRepo == null)
            {
                throw new ArgumentException("Value cannot be null", "teamRepo");
            }
            if (dimensionRepo == null)
            {
                throw new ArgumentException("Value cannot be null", "dimensionRepo");
            }

            _assessmentRepo = assessmentRepo;
            _teamRepo       = teamRepo;
            _dimensionRepo  = dimensionRepo;
        }
Example #9
0
 public DimensionLogic(Data.DimensionRepo dimensionRepository, System.Security.Principal.IPrincipal principal)
     : base(principal)
 {
     _dimensionRepository = dimensionRepository;
 }
 public TeamController(Data.TeamRepo teamRepo, Data.AssessmentRepo assessmentRepo, Data.DimensionRepo dimensionRepo)
 {
     _teamRepo       = teamRepo;
     _assessmentRepo = assessmentRepo;
     _dimensionRepo  = dimensionRepo;
 }
 public AssessmentController(Data.AssessmentRepo assessmentRepo, Data.TeamRepo teamRepo, Data.DimensionRepo dimensionRepo)
 {
     _assessmentRepo = assessmentRepo;
     _teamRepo = teamRepo;
     _dimensionRepo = dimensionRepo;
 }
 public DimensionController(Data.DimensionRepo dimensionRepo)
 {
     _dimensionRepo = dimensionRepo;
     _dimensionLogic = new Logic.DimensionLogic(_dimensionRepo, CurrentUser == null ? this.User : CurrentUser);
 }
 public GoalController(Data.GoalRepo goalRepository, Data.TeamRepo teamRepo, Data.DimensionRepo dimensionRepo)
 {
     _goalRepository = goalRepository;
     _teamRepo       = teamRepo;
     _dimensionRepo  = dimensionRepo;
 }
 public DimensionLogic(Data.DimensionRepo dimensionRepository, System.Security.Principal.IPrincipal principal)
     : base(principal)
 {
     _dimensionRepository = dimensionRepository;
 }
 public DimensionController(Data.DimensionRepo dimensionRepo)
 {
     _dimensionRepo  = dimensionRepo;
     _dimensionLogic = new Logic.DimensionLogic(_dimensionRepo, CurrentUser == null ? this.User : CurrentUser);
 }