public UserSectorsServiceTests() { var config = new MapperConfiguration(cfg => { cfg.AddProfile <SectorProfile>(); }); mapper = new AutoMapper.Mapper(config); userSectorsRepository = Substitute.For <IUserSectorsRepository>(); userSectorsService = new UserSectorsService(userSectorsRepository, mapper); }
public UserSectorsService(IUserSectorsRepository userSectorsRepository, IMapper mapper) { this.userSectorsRepository = userSectorsRepository ?? throw new ArgumentNullException(nameof(userSectorsRepository)); this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public AppUserService(IUnitOfWork unitOfWork, IAppUserRepository repository, IUserSectorsRepository userSectorsRepository) : base(unitOfWork, repository) { _appUserRepository = repository; _userSectorsRepository = userSectorsRepository; }