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;
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
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;
        }
 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;
 }