Esempio n. 1
0
 public VisitorController(IAnimalRepository animalRepository,
                          IShelterRepository shelterRepository, IPostRepository postRepository)
 {
     _animalRepository  = animalRepository;
     _shelterRepository = shelterRepository;
     _postRepository    = postRepository;
 }
Esempio n. 2
0
 public ShelterService(IShelterRepository shelterRepository, IShelterDogRepository shelterDogRepository, IAccountService accountService, ISecurityService securityService, IMapper mapper, ILogger <ShelterService> logger)
 {
     this.shelterRepository    = shelterRepository;
     this.shelterDogRepository = shelterDogRepository;
     this.accountService       = accountService;
     this.securityService      = securityService;
     this.mapper = mapper;
     this.logger = logger;
 }
Esempio n. 3
0
        public ShelterController(IAnimalRepository animalRepository, IAdopterRepository adopterRepository,
                                 IShelterRepository shelterRepository, IClaimProvider claimProvider, IAccessValidator accessValidator)
        {
            _animalRepository  = animalRepository;
            _adopterRepository = adopterRepository;
            _shelterRepository = shelterRepository;

            _shelterId       = claimProvider.GetUserId();
            _accessValidator = accessValidator;
        }
Esempio n. 4
0
        //public ShelterLogicBuilder WithShelterRepository(ShelterRepository shelterRepository)
        //{
        //    _shelterRepository = shelterRepository;
        //    return this;
        //}

        public ShelterLogic Build()
        {
            if (_shelterRepository == null)
            {
                var shelterRepositoryMock = new Mock <IShelterRepository>();
                shelterRepositoryMock.Setup(s => s.AddAnimal(It.IsAny <Animal>())).Returns(true);
                shelterRepositoryMock.Setup(s => s.RemoveAnimal(It.IsAny <Animal>())).Returns(true);
                shelterRepositoryMock.Setup(s => s.IsShelterEmpty()).Returns(false);
                shelterRepositoryMock.Setup(s => s.IsShelterFull()).Returns(false);
                shelterRepositoryMock.Setup(s => s.GetNumberOfCatsInShelter()).Returns(2);
                shelterRepositoryMock.Setup(s => s.GetNumberOfDogsInShelter()).Returns(2);
                _shelterRepository = shelterRepositoryMock.Object;
            }
            return(new ShelterLogic(_shelterRepository));
        }
Esempio n. 5
0
        public TouristInformationController(
            IAttractionRepository attractionRepository,
            IPartyRepository partyRepository,
            IShelterRepository shelterRepository,
            ITrailRepository trailRepository,
            IRegionRepository regionRepository,
            IConverter converter
            )
        {
            _attractionRepository = attractionRepository;
            _partyRepository      = partyRepository;
            _regionRepository     = regionRepository;
            _shelterRepository    = shelterRepository;
            _trailRepository      = trailRepository;

            _converter = converter;
        }
 public ShelterController(IShelterRepository shelterRepository)
 {
     _shelterRepository = shelterRepository;
 }
 public ShelterService(IShelterRepository repository)
 {
     _repository = repository;
 }
Esempio n. 8
0
 public ShelterController(IShelterRepository repo)
 {
     repository = repo;
 }
Esempio n. 9
0
 public AdminController(IUserRepository userRepository, IShelterRepository shelterRepository, IPostRepository postRepository)
 {
     _userRepository    = userRepository;
     _shelterRepository = shelterRepository;
     _postRepository    = postRepository;
 }
Esempio n. 10
0
 public ShelterLogic(IShelterRepository shelterRepository)
 {
     _shelterRepository = shelterRepository;
     _purchaseHelper    = new PurchaseHelper(_shelterRepository);
 }
Esempio n. 11
0
 public SheltersController(IShelterRepository shelterRepo, IMapper mapper)
 {
     this.shelterRepo = shelterRepo;
     this.mapper      = mapper;
 }
 public ShelterRepositoryTests(DatabaseFixture databaseAuthFixture)
 {
     shelterRepository = databaseAuthFixture.ShelterRepository;
 }
Esempio n. 13
0
 public ShelterService(IShelterRepository shelterRepo)
 {
     _shelterRepo = shelterRepo;
 }
Esempio n. 14
0
 public ShelterController(IShelterRepository repository)
 {
     _repository = repository;
 }
Esempio n. 15
0
 public PurchaseHelper(IShelterRepository shelterRepository)
 {
     _shelterRepository = shelterRepository;
 }