public void Initialize() { // No need to mock this repositories as they do not connect to the database but have their data in-memory. var repositoryFactory = new RepositoryFactory(); _positionRepository = repositoryFactory.CreatePositionRepository(); _formationRepository = repositoryFactory.CreateFormationRepository(); }
public EmployeeController(IEmployeeRepository iEmployeeRepository, IPositionRepository iPositionRepository, IUnitOfWork iUnitOfWork, HtmlEncoder htmlEncoder) { this.iEmployeeRepository = iEmployeeRepository; this.iPositionRepository = iPositionRepository; this.iUnitOfWork = iUnitOfWork; this.htmlEncoder = htmlEncoder; }
public PositionFactory(IPositionRepository repository) { _repository = repository; foreach (var position in _repository.Positions) { positions.Add(position.Name.ToLower(), position); } }
public FootballerService(IFootballerRepository footballerRepository, IPositionRepository positionRepository, IUnitOfWork unitOfWork) { this.footballerRepository = footballerRepository; this.positionRepository = positionRepository; this.unitOfWork = unitOfWork; }
public UpsertUserService(IDepartmentRepository departmentRepository, ICategoryRepository categoryRepository, IPositionRepository positionRepository, IPositionLevelRepository positionLevelRepository, IRoleRepository roleRepository) { _departmentRepository = departmentRepository ?? throw new ArgumentNullException(); _categoryRepository = categoryRepository ?? throw new ArgumentNullException(); _positionRepository = positionRepository ?? throw new ArgumentNullException(); _positionLevelRepository = positionLevelRepository ?? throw new ArgumentNullException(); _roleRepository = roleRepository ?? throw new ArgumentNullException(); }
public PositionController( IPositionRepository _Position , IUserRepository _user ) { PositionRepository = _Position; userRepository = _user; }
/// <summary> /// Constructor that sets required repositories and unit of work for this service /// </summary> /// <param name="categoryRepository">Parameter for setting CategoryRepository</param> /// <param name="positionRepository">Parameter for setting PositionRepository</param> /// <param name="unitOfWork">Parameter for setting UnitOfWork</param> public CategoryService(ICategoryRepository categoryRepository, IPositionRepository positionRepository, IUnitOfWork unitOfWork) { this.CategoryRepository = categoryRepository; this.PositionRepository = positionRepository; this.UnitOfWork = unitOfWork; }
public TeamController(ApplicationDbContext context, ITeamRepository teamRepository, IPlayerRepository playerRepository, IPositionRepository positionRepository, ICountryRepository countryRepository) { _teamRepository = teamRepository; _playerRepository = playerRepository; _countryRepository = countryRepository; _positionRepository = positionRepository; }
public PositionService( IPositionRepository positionRepository, ILogFactory logFactory) { _positionRepository = positionRepository; _log = logFactory.CreateLog(this); _cache = new InMemoryCache <Position>(GetKey, false); }
// If you are using Dependency Injection, you can delete the following constructor public ReporterController() { context = new VITVContext(); _reporterRepository = new ReporterRepository(context); _positionRepository = new PositionRepository(context); _positionLevelRepository = new PositionLevelRepository(context); _roleRepository = new RoleRepository(context); _videoRepository = new VideoRepository(context); }
public EmployeeService(IEmployeeRepository employeeRepository, IEmploymentTypeRepository employmentTypeRepository, IPositionRepository positionRepository, IProgramRepository programRepository, IRoleRepository roleRepository, IEmployeeProgramRepository employeeProgramRepository) { this.employeeRepository = employeeRepository; this.employmentTypeRepository = employmentTypeRepository; this.positionRepository = positionRepository; this.roleRepository = roleRepository; this.programRepository = programRepository; this.employeeProgramRepository = employeeProgramRepository; }
public ExperienceService(IInsuranceRepository insuranceRepository, IExperienceRepository experienceRepository, IEmployeeRepository employeeRepository,ICompanyRepository companyRepository,IPositionRepository positionRepository, IUnitOfWork unitOfWork) { this.experienceRepository = experienceRepository; this.employeeRepository = employeeRepository; this.companyRepository = companyRepository; this.positionRepository = positionRepository; this.insuranceRepository = insuranceRepository; this.unitOfWork = unitOfWork; }
public PositionService( IPositionRepository positionRepository, IDateTime dateTime, ICurrentUserService currentUserService) { _positionRepository = positionRepository; _dateTime = dateTime; _currentUserService = currentUserService; }
// private readonly ITestService _testService; public CandidatService(IPositionRepository positionRepository, ICandidatRepositories candidatRepositories, IAnswerService answerService, ITestRepository testRepository) { this._positionRepository = positionRepository; this._candidatRepositories = candidatRepositories; this._testRepository = testRepository; // _testService = testService; _answerService = answerService; }
public UpsertUserServiceTest() { _department = A.Fake <IDepartmentRepository>(); _category = A.Fake <ICategoryRepository>(); _position = A.Fake <IPositionRepository>(); _positionLevel = A.Fake <IPositionLevelRepository>(); _role = A.Fake <IRoleRepository>(); _upsertUserService = new UpsertUserService(_department, _category, _position, _positionLevel, _role); }
public EmployeeService(IEmployeeRepository employeeRepository, IPositionRepository positionRepository, IPositionEmployeeRepository positionEmployeeRepository, IMapper mapper) { _employeeRepository = employeeRepository; _positionRepository = positionRepository; _positionEmployeeRepository = positionEmployeeRepository; _mapper = mapper; }
/// <summary> /// Constructor that sets required repositories and unit of work for this service /// </summary> /// <param name="departmentRepository">Parameter for setting DepartmentRepository</param> /// <param name="agentRepository">Parameter for setting AgentRepository</param> /// <param name="positionRepository">Parameter for setting PositionRepository</param> /// <param name="unitOfWork">Parameter for setting UnitOfWork</param> public DepartmentService(IDepartmentRepository departmentRepository, IAgentRepository agentRepository, IPositionRepository positionRepository, IUnitOfWork unitOfWork) { this.DepartmentRepository = departmentRepository; this.AgentRepository = agentRepository; this.PositionRepository = positionRepository; this.UnitOfWork = unitOfWork; }
public PositionController( IPositionRepository positionRepository, IUserRepository userRepository, ILogger <EmployeeController> logger ) { _positionRepository = positionRepository; _userRepository = userRepository; _logger = logger; }
public void PositionRepository_RemoveTest() { IPositionRepository positionRepository = IoCFactory.Instance.CurrentContainer.Resolve <IPositionRepository>(); Guid id = new Guid("ff9b26b1-8c8c-c649-318e-08d1e2d77734"); Position byId = positionRepository.GetElementById(id); positionRepository.Remove(byId); positionRepository.UnitOfWork.Commit(); Assert.IsNull((object)positionRepository.GetElementById(byId.Id)); }
public void PositionRepository_GetFilteredTest() { IPositionRepository positionRepository = IoCFactory.Instance.CurrentContainer.Resolve <IPositionRepository>(); string title = "Owner"; IEnumerable <Position> filteredElements = positionRepository.GetFilteredElements((x => x.Title != (object)null && x.Title.ToLower() == title.ToLower())); Assert.IsNotNull((object)filteredElements); Assert.IsTrue(Enumerable.Count <Position>(filteredElements) == 1); Assert.IsTrue(Enumerable.First <Position>(filteredElements).Title == title); }
/// <summary> /// Constructor that sets required repositories and unit of work for this service /// </summary> /// <param name="candidateRepository">Parameter for setting CandidateRepository</param> /// <param name="positionRepository">Parameter for setting PositionRepository</param> /// <param name="interviewRepository">Parameter for setting InterviewRepository</param> /// <param name="unitOfWork">Parameter for setting UnitOfWork</param> public CandidateService(ICandidateRepository candidateRepository, IPositionRepository positionRepository, IInterviewRepository interviewRepository, IUnitOfWork unitOfWork) { this.CandidateRepository = candidateRepository; this.PositionRepository = positionRepository; this.InterviewRepository = interviewRepository; this.UnitOfWork = unitOfWork; }
public UserController(IUserRepository UserRepository, IDepartmentRepository DepartmentRepository, IPositionRepository PositionRepository, IUserRoleRepository UserRoleRepository) { _userRepository = UserRepository; _departmentRepository = DepartmentRepository; _posRepository = PositionRepository; _userRoleRepository = UserRoleRepository; }
/// <summary> /// Constructor that sets required repositories and unit of work for this service /// </summary> /// <param name="clientRepository">Parameter for setting ClientRepository</param> /// <param name="positionRepository">Parameter for setting PositionRepository</param> /// <param name="notificationRepository">Parameter for setting NotificationRepository</param> /// <param name="unitOfWork">Parameter for setting UnitOfWork</param> public ClientService(IClientRepository clientRepository, IPositionRepository positionRepository, INotificationRepository notificationRepository, IUnitOfWork unitOfWork) { this.ClientRepository = clientRepository; this.PositionRepository = positionRepository; this.NotificationRepository = notificationRepository; this.UnitOfWork = unitOfWork; }
public AuthenticationController(IEmployeeRepository iEmployeeRepository, UserManager <EmployeeApplicationUser> userManager, IPositionRepository iPositionRepository, IConfiguration configuration) { this.iEmployeeRepository = iEmployeeRepository; this.userManager = userManager; this.iPositionRepository = iPositionRepository; this.Configuration = configuration; }
public UpdateEmployeeHandler(IMediator mediator, IEmployeeRepository employeerepository, IPositionRepository positionrepository, IDepartmentRepository departmentrepository, IVacationTypeRepository vacationtyperepository, UserManager <ApplicationUser> usermanager, RoleManager <ApplicationRole> rolemanager) { Mediator = mediator; EmployeeRepository = employeerepository; PositionRepository = positionrepository; DepartmentRepository = departmentrepository; VacationTypeRepository = vacationtyperepository; UserManager = usermanager; RoleManager = rolemanager; }
public TeacherController(ITeacherRepository repository, IServiceRepository serviceRepository, IPositionRepository positionRepository, ApplicationDbContext context, IGroupRepository groupRepository, IHostingEnvironment hostingEnviroment) { _repository = repository; _schoolServices = serviceRepository; _groupRepository = groupRepository; _hostingEnviroment = hostingEnviroment; _proxyFactory = new TeacherProxyFactory(context); _positionFactory = new PositionFactory(positionRepository); _factory = new TeacherFactory(context, _positionFactory); }
public MovementSystem( IMovementSender movementSender, ILocationSender locationSender, IMovementRepository movementRepository, IMapService mapService, IPositionRepository positionRepository) { _movementSender = movementSender; _locationSender = locationSender; _movementRepository = movementRepository; _mapService = mapService; _positionRepository = positionRepository; }
public PositionManager(IPositionRepository positionRepository, IMessageBus messageBus, IPositionCache positionCache, IUpdatesManager updatesManager, ITraderInfoManager traderInfoManager) { _positionRepository = positionRepository; _messageBus = messageBus; _positionCache = positionCache; _updatesManager = updatesManager; _traderInfoManager = traderInfoManager; }
public EmployeesController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmployeeRepository employeeRepository, IHostingEnvironment hostingEnvironment, IPersonRepository personRepository, IAccountRepository accountRepository, ISpecialityRepository specialityRepository, IPositionRepository positionRepository, IDoctorsScheduleRepository doctorsScheduleRepository) { this.userManager = userManager; this.signInManager = signInManager; this.hostingEnvironment = hostingEnvironment; _personRepository = personRepository; _employeeRepository = employeeRepository; _accountRepository = accountRepository; _specialityRepository = specialityRepository; _positionRepository = positionRepository; _doctorsScheduleRepository = doctorsScheduleRepository; }
public RegisterModel( UserManager <EmployeeApplicationUser> userManager, SignInManager <EmployeeApplicationUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, IPositionRepository iPositionRepository) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; this.iPositionRepository = iPositionRepository; }
public AdminController( IPlayerRepository repoPlayers, IClubRepository repoClubs, IPositionRepository repoPositions, IStatRepository repoStats, IAppDataRepository repoAppData) { repositoryPlayers = repoPlayers; repositoryClubs = repoClubs; repositoryPositions = repoPositions; repositoryStats = repoStats; repositoryAppData = repoAppData; }
public CustsController(IMyService my, ICustRepository custsRepo, ICityRepository cityRepo, IMainIndustryRepository mainIndustryRepo, IIndustryRepository industryRepo, IPositionRepository positionRepo , IUserRepository userRepo, IContactRepository contactRepo) { My = (MyService)my; _custRepo = custsRepo; _cityRepo = cityRepo; _mainIndustryRepo = mainIndustryRepo; _industryRepo = industryRepo; _positionRepo = positionRepo; _contactRepo = contactRepo; _userRepo = userRepo; }
public MainPageViewModel(INavigationService navigationService, ILocationService locationService, IApiService apiService, IPositionRepository positionRepository) : base(navigationService) { Title = "Main Page"; _locationService = locationService; _apiService = apiService; _positionRepository = positionRepository; StartService = new DelegateCommand(Start); StopService = new DelegateCommand(Stop); Locations = new ObservableCollection <Position>(); }
public ManagementController(IAccountRepository accountRepository, ISpotRepository spotRepository, IPositionRepository positionRepository, IAccountGroupsRepository accountGroupsRepository, IDealerRepository dealerRepository, IWalletRepository walletRepository, IPaymentTransferRepository paymentTransferRepository, IUserRepository userRepository, ITradeSignalRepository tradeSignalRepository) { this.accountRepository = accountRepository; this.accountGroupsRepository = accountGroupsRepository; this.spotRepository = spotRepository; this.positionRepository = positionRepository; this.dealerRepository = dealerRepository; this.walletRepository = walletRepository; this.paymentTransferRepository = paymentTransferRepository; this.userRepository = userRepository; this.tradeSignalRepository = tradeSignalRepository; }
public PositionController() { repository = new PositionRepository(); }
public PositionController(IPositionRepository postionRepository) { _positionRepository = postionRepository; }
public PositionsController(IDepartmentRepository departmentRepository, IPositionRepository positionRepository) { this.departmentRepository = departmentRepository; this.positionRepository = positionRepository; }
public HandleCollision(IPositionRepository positionRepository, IConflictRepository conflictRepository) { _positionRepository = positionRepository; _conflictRepository = conflictRepository; }
public PositionBreezeApiController(IPositionRepository positionRepository) { _positionRepository = positionRepository; }
//TODO: Figure out why not executing quickly public HandlePosition(IPositionRepository positionRepository, IAircraftRepository aircraftRepository, IConflictRepository conflictRepository) { _positionRepository = positionRepository; _aircraftRepository = aircraftRepository; _conflictRepository = conflictRepository; }
public PositionService(IPositionRepository positionRepository, IScreenScrapper screenScrapper) { _positionRepository = positionRepository; _screenScrapper = screenScrapper; }
public VoteService(IPositionRepository positionRepository, ICandidateRepository candidateRepository, IVoteRepository voteRepository) { this.positionRepository = positionRepository; this.candidateRepository = candidateRepository; this.voteRepository = voteRepository; }
internal PositionDeterminator(IPositionRepository positionRepository, IListRandomizer listRandomizer) { _positionRepository = positionRepository; _listRandomizer = listRandomizer; }
public void Setup() { var request = new SimpleWorkerRequest("", "", "", null, new StringWriter()); var context = new HttpContext(request); //context. //HttpContext.Current = context; kernel = new StandardKernel(new TestServiceModule()); DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel)); accountRepository = new AccountRepository(); accountGroupsRepository = new AccountGroupsRepository(); dealerRepository = new DealerRepository(); positionRepository = new PositionRepository(); }
public PositionService(IPositionRepository positionRepository,IUnitOfWork unitOfWork) { this.positionRepository = positionRepository; this.unitOfWork = unitOfWork; }