public void SetUp()
        {
            var mapper = DtoMappings.GetMapperConfiguration().CreateMapper();

            _shiftRepository      = new ShiftRepository(_connection);
            _assignmentRepository = new AssignmentRepository(_connection, mapper);
            _planRepository       = new PlanRepository(_connection, mapper);
        }
Esempio n. 2
0
 public void SetUp()
 {
     _mapper               = DtoMappings.GetMapperConfiguration().CreateMapper();
     _userRepository       = new UserRepository(_connection);
     _assignmentRepository = new AssignmentRepository(_connection, _mapper);
     _planRepository       = new PlanRepository(_connection, _mapper);
     _user = _userRepository.GetUser(1).Result;
 }
Esempio n. 3
0
 public void Setup()
 {
     _planRepositoryMock  = new Mock <IPlanRepository>();
     _mapper              = DtoMappings.GetMapperConfiguration().CreateMapper();
     _loggerMock          = new Mock <ILogger <PlanService> >();
     _groupRepositoryMock = new Mock <IGroupRepository>();
     _planService         = new PlanService(_planRepositoryMock.Object, _loggerMock.Object, _mapper, _groupRepositoryMock.Object);
 }
Esempio n. 4
0
 public void Setup()
 {
     _loggerMock           = new Mock <ILogger <UserService> >();
     _groupRepositoryMock  = new Mock <IGroupRepository>();
     _userRepositoryMock   = new Mock <IUserRepository>();
     _emailServiceMock     = new Mock <IEmailService>();
     _patrolRepositoryMock = new Mock <IPatrolRepository>();
     _mapper      = DtoMappings.GetMapperConfiguration().CreateMapper();
     _userService = new UserService(_loggerMock.Object, _userRepositoryMock.Object, _emailServiceMock.Object, _groupRepositoryMock.Object, _patrolRepositoryMock.Object, _mapper);
 }
Esempio n. 5
0
        public void SetUp()
        {
            _mapper           = DtoMappings.GetMapperConfiguration().CreateMapper();
            _planRepository   = new PlanRepository(_connection, _mapper);
            _patrolRepository = new PatrolRepository(_connection);
            _userRepository   = new UserRepository(_connection);

            _user   = _userRepository.GetUser(1).Result;
            _patrol = _patrolRepository.GetPatrolsForUser(_user.Id).Result.First(x => x.Name == "Big Mountain Patrol");
            _plan   = _planRepository.GetPlansForPatrol(_patrol.Id).Result.First(x => x.Name == "Ski Alpine");
        }
Esempio n. 6
0
        public void Setup()
        {
            _announcementRepositoryMock = new Mock <IAnnouncementRepository>();
            _mapper               = DtoMappings.GetMapperConfiguration().CreateMapper();
            _loggerMock           = new Mock <ILogger <EventService> >();
            _systemClockMock      = new Mock <ISystemClock>();
            _patrolRepositoryMock = new Mock <IPatrolRepository>();
            _userRepositoryMock   = new Mock <IUserRepository>();
            _emailService         = new Mock <IEmailService>();

            _announcementService = new AnnouncementService(_announcementRepositoryMock.Object, _loggerMock.Object, _mapper, _systemClockMock.Object, _emailService.Object, _patrolRepositoryMock.Object, _userRepositoryMock.Object);
        }
Esempio n. 7
0
        public void Setup()
        {
            _assignmentRepositoryMock = new Mock <IAssignmentRepository>();
            _mapper              = DtoMappings.GetMapperConfiguration().CreateMapper();
            _loggerMock          = new Mock <ILogger <AssignmentService> >();
            _planServiceMock     = new Mock <IPlanService>();
            _patrolRepository    = new Mock <IPatrolRepository>();
            _groupRepositoryMock = new Mock <IGroupRepository>();
            _planRepositoryMock  = new Mock <IPlanRepository>();
            _systemClockMock     = new Mock <ISystemClock>();

            _assignmentService = new AssignmentService(_assignmentRepositoryMock.Object, _planServiceMock.Object, _loggerMock.Object, _planRepositoryMock.Object, _patrolRepository.Object, _groupRepositoryMock.Object, _mapper, _systemClockMock.Object);
        }
 public void Setup()
 {
     _loggerMock           = new Mock <ILogger <WorkItemService> >();
     _groupRepositoryMock  = new Mock <IGroupRepository>();
     _userRepositoryMock   = new Mock <IUserRepository>();
     _emailServiceMock     = new Mock <IEmailService>();
     _patrolRepositoryMock = new Mock <IPatrolRepository>();
     _shiftRepositoryMock  = new Mock <IShiftRepository>();
     _workItemRepository   = new Mock <IWorkItemRepository>();
     _systemClockMock      = new Mock <ISystemClock>();
     _mapper          = DtoMappings.GetMapperConfiguration().CreateMapper();
     _workItemService = new WorkItemService(_loggerMock.Object, _patrolRepositoryMock.Object, _groupRepositoryMock.Object, _shiftRepositoryMock.Object, _systemClockMock.Object,
                                            _emailServiceMock.Object, _userRepositoryMock.Object, _workItemRepository.Object, _mapper);
 }
Esempio n. 9
0
        public void Setup()
        {
            _assignmentRepositoryMock = new Mock <IAssignmentRepository>();
            _mapper               = DtoMappings.GetMapperConfiguration().CreateMapper();
            _loggerMock           = new Mock <ILogger <ScheduleService> >();
            _shiftRepositoryMock  = new Mock <IShiftRepository>();
            _patrolRepository     = new Mock <IPatrolRepository>();
            _groupRepositoryMock  = new Mock <IGroupRepository>();
            _systemClockMock      = new Mock <ISystemClock>();
            _userRepositoryMock   = new Mock <IUserRepository>();
            _emailServiceMock     = new Mock <IEmailService>();
            _shiftWOrkItemService = new Mock <IShiftWorkItemService>();

            _scheduleService = new ScheduleService(_loggerMock.Object, _patrolRepository.Object, _groupRepositoryMock.Object, _shiftRepositoryMock.Object, _systemClockMock.Object, _emailServiceMock.Object, _userRepositoryMock.Object, _shiftWOrkItemService.Object);
        }