public void Init() { _userRepository = new UserRepository(); _commonPlacesRepository = new CommonPlacesRepository(); _missionRepository = new MissionRepository(); _missionSetRepository = new MissionSetRepository(); _missionRequestRepository = new MissionRequestRepository(); _appCountersRepository = new AppCountersRepository(); _hintRequestRepository = new HintRequestRepository(); _ratingRepository = new RatingRepository(); var imageProvider = new ImageProvider(); _imageService = new ImageService(imageProvider, _userRepository); _ratingService = new RatingService(_userRepository, _ratingRepository, true); _appCountersService = new AppCountersService(_appCountersRepository); _service = new UserService(_userRepository, _missionRepository, _ratingRepository, _appCountersService); _missionService = new MissionService(_missionRepository, _userRepository, _missionSetRepository, _missionRequestRepository, _hintRequestRepository, _ratingService, _commonPlacesRepository); _missionRequestService = new MissionRequestService(_missionRequestRepository, _missionRepository, _userRepository, _commonPlacesRepository, _ratingService, new NotificationService(new NotificationProvider()), _appCountersService); var principal = new ClaimsPrincipal(); principal.AddIdentity(new ClaimsIdentity(new[] { new Claim(ClaimTypes.Sid, "User1Id") })); _controller = new MissionController(_missionService, _missionRequestService, _imageService) { User = principal }; }
public void Init() { _repository = new MissionRequestRepository(); _missonRepository = new MissionRepository(); _commonPlacesRepository = new CommonPlacesRepository(); _missionSetRepository = new MissionSetRepository(); _userRepository = new UserRepository(); _ratingRepository = new RatingRepository(); _ratingService = new RatingService(_userRepository, _ratingRepository, true); _notificationService = new NotificationService(new NotificationProvider()); _missionService = new MissionService(_missonRepository, _userRepository, _missionSetRepository, new MissionRequestRepository(), new HintRequestRepository(), _ratingService, _commonPlacesRepository); _service = new MissionRequestService(_repository, _missonRepository, _userRepository, _commonPlacesRepository, _ratingService, _notificationService, new AppCountersService(new AppCountersRepository())); _controller = new MissionRequestController(_service); }
public void Init() { _repository = new MissionRequestRepository(); _missonRepository = new MissionRepository(); _commonPlacesRepository = new CommonPlacesRepository(); _userRepository = new UserRepository(); _ratingRepository = new RatingRepository(); _ratingService = new RatingService(_userRepository, _ratingRepository, true); _missionService = new MissionService(_missonRepository, _userRepository, new MissionSetRepository(), new MissionRequestRepository(), new HintRequestRepository(), _ratingService, _commonPlacesRepository); _service = new MissionRequestService(_repository, _missonRepository, _userRepository, _commonPlacesRepository, _ratingService, new NotificationService(null), new AppCountersService(new AppCountersRepository())); var principal = new ClaimsPrincipal(); principal.AddIdentity(new ClaimsIdentity(new[] { new Claim(ClaimTypes.Sid, "User1Id") })); }