Пример #1
0
 public BreedsController(IBreedsRepository breedsRepository, ILogger <BreedsController> logger, IWebHostEnvironment env)
 {
     stopWatch             = new Stopwatch();
     this.breedsRepository = breedsRepository;
     this.logger           = logger;
     this.env = env;
 }
Пример #2
0
 public AnimalsRepository(VaccinationDbContext dbContext,
                          IBreedsRepository breedsRepository, IUsersRepository usersRepository)
 {
     _dbContext        = dbContext;
     _breedsRepository = breedsRepository;
     _usersRepository  = usersRepository;
 }
Пример #3
0
 public AnimalsController(IAnimalsRepository animalsRepository,
                          IBreedsRepository breedsRepository, IUsersRepository usersRepository)
 {
     _animalsRepository = animalsRepository;
     _breedsRepository  = breedsRepository;
     _usersRepository   = usersRepository;
 }
Пример #4
0
 public GraphicsRepository(VaccinationDbContext dbContext,
                           IBreedsRepository breedsRepository, IVaccinesRepository vaccinesRepository)
 {
     _dbContext          = dbContext;
     _breedsRepository   = breedsRepository;
     _vaccinesRepository = vaccinesRepository;
 }
Пример #5
0
 public AdministratorController(IAdminRepository adminRepository, IBreedsRepository breedRepository,
                                IGendersRepository gendersRepository, IProfileImageRepository imageRepository)
 {
     this.adminRepository   = adminRepository;
     this.breedRepository   = breedRepository;
     this.gendersRepository = gendersRepository;
     this.imageRepository   = imageRepository;
 }
Пример #6
0
 /// <summary>
 /// Construtor recebe como parâmetro a instância das classes de AppSettings, Integração e Repositórios
 /// </summary>
 /// <param name="appSettings"></param>
 /// <param name="theCatAPI"></param>
 /// <param name="breedsRepository"></param>
 /// <param name="categoryRepository"></param>
 /// <param name="imageUrlRepository"></param>
 public CommandCapture(IAppConfiguration appConfiguration, ITheCatAPI theCatAPI, IBreedsRepository breedsRepository, ICategoryRepository categoryRepository, IImageUrlRepository imageUrlRepository)
 {
     this.appSettings        = appConfiguration.GetAppSettings();
     this.theCatAPI          = theCatAPI;
     this.breedsRepository   = breedsRepository;
     this.categoryRepository = categoryRepository;
     this.imageUrlRepository = imageUrlRepository;
 }
Пример #7
0
 /// <summary>
 /// Construtor utilizado para instaciar as classes que serão testadas
 /// </summary>
 public ApplicationTest()
 {
     appConfiguration   = new AppConfiguration();
     theCatDBContext    = new TheCatDBContext(appConfiguration);
     theCatAPI          = new TheCatAPIService(appConfiguration);
     imageUrlRepository = new ImageUrlRepository(theCatDBContext);
     breedsRepository   = new BreedsRepository(theCatDBContext, imageUrlRepository);
     categoryRepository = new CategoryRepository(theCatDBContext);
     commandCapture     = new CommandCapture(appConfiguration, theCatAPI, breedsRepository, categoryRepository, imageUrlRepository);
 }
Пример #8
0
 public AdoptionController(
     IConfiguration configuration,
     IAdminRepository adminRepository,
     IBreedsRepository breedRepository,
     IGendersRepository gendersRepository,
     IAppoinmentRepository appoinmentRepository,
     UserManager <ApplicationUser> userManager,
     IPersonRepository personRepository)
 {
     Configuration             = configuration;
     this.adminRepository      = adminRepository;
     this.breedRepository      = breedRepository;
     this.gendersRepository    = gendersRepository;
     this.appoinmentRepository = appoinmentRepository;
     _userManager          = userManager;
     this.personRepository = personRepository;
 }
Пример #9
0
        /// <summary>
        /// Construtor utilizado para instanciar as classes que serão testadas
        /// </summary>
        public RepositoriesTest()
        {
            appConfiguration = new AppConfiguration();
            var contextDB = new TheCatDBContext(appConfiguration);

            breedsBase = new Breeds("abys", "Abyssinian");
            breedsBase.SetOrigin("Egypt");
            breedsBase.SetTemperament("Active, Energetic, Independent, Intelligent, Gentle");
            breedsBase.SetDescription("The Abyssinian is easy to care for, and a joy to have in your home. They’re affectionate cats and love both people and other animals.");

            categoryBase = new Category(1, "hats");

            imageUrlBase = new ImageUrl("393", "https://cdn2.thecatapi.com/images/393.jpg");
            imageUrlBase.SetWidth(1024);
            imageUrlBase.SetHeight(654);
            imageUrlBase.SetBreeds(breedsBase);
            imageUrlBase.SetCategory(categoryBase);

            imageUrlRepository = new ImageUrlRepository(contextDB);
            breedsRepository   = new BreedsRepository(contextDB, imageUrlRepository);
            categoryRepository = new CategoryRepository(contextDB);
            logEventRepository = new LogEventRepository(contextDB);
        }
Пример #10
0
 public BreedsBusinessLogic(IBreedsRepository breedsRepository)
 {
     this.breedsRepository = breedsRepository;
 }
Пример #11
0
 public BreedsController(IBreedsRepository breedsRepository)
 {
     _breedsRepository = breedsRepository;
 }