public FightersServiceTests() { DbContextOptionsBuilder <ApplicationDbContext> options = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()); Account account = new Account("Cloudinary", "Test", "Account"); Cloudinary cloudinary = new Cloudinary(account); AutoMapperConfig.RegisterMappings(typeof(FightersDropDownViewModel).Assembly); this.applicationDbContext = new ApplicationDbContext(options.Options); this.fightersRepository = new EfDeletableEntityRepository <Fighter>(this.applicationDbContext); this.usersRepository = new EfDeletableEntityRepository <ApplicationUser>(this.applicationDbContext); this.fightsRepository = new EfDeletableEntityRepository <Fight>(this.applicationDbContext); this.recordsRepository = new EfDeletableEntityRepository <PugnaFighting.Data.Models.Record>(this.applicationDbContext); this.biographiesRepository = new EfDeletableEntityRepository <Biography>(this.applicationDbContext); this.skillsRepository = new EfDeletableEntityRepository <Skill>(this.applicationDbContext); this.organizationsRepository = new EfDeletableEntityRepository <Organization>(this.applicationDbContext); this.cloudinaryService = new CloudinaryService(cloudinary); this.biographiesService = new BiogrpahiesService(this.biographiesRepository, this.cloudinaryService); this.skillsService = new SkillsService(this.skillsRepository, this.usersRepository); this.fightersService = new FightersService( this.fightersRepository, this.recordsRepository, this.fightsRepository, this.usersRepository, this.biographiesService, this.skillsService); var user = new ApplicationUser() { Id = "51926c23-8a91-4e7e-94be-a97dd84bad1d", Coins = 10000, UserName = "******", FightersCount = 3, }; this.usersRepository.AddAsync(user); this.usersRepository.SaveChangesAsync(); foreach (var fighter in this.GetTestFighters()) { this.fightersRepository.AddAsync(fighter); this.fightersRepository.SaveChangesAsync(); } foreach (var skill in this.GetTestSkills()) { this.skillsRepository.AddAsync(skill); this.skillsRepository.SaveChangesAsync(); } foreach (var record in this.GetTestRecords()) { this.recordsRepository.AddAsync(record); this.recordsRepository.SaveChangesAsync(); } foreach (var biography in this.GetTestBiographies()) { this.biographiesRepository.AddAsync(biography); this.biographiesRepository.SaveChangesAsync(); } foreach (var organization in this.GetTestOrganizations()) { this.organizationsRepository.AddAsync(organization); this.organizationsRepository.SaveChangesAsync(); } }
public CountriesController(ICountriesService countriesService, ICloudinaryService cloudinaryService) { this.countriesService = countriesService; this.cloudinaryService = cloudinaryService; }
public ProductsController(IProductService productsService, ICloudinaryService cloudinaryService, ICategoryService categoriesService) { this.productsService = productsService; this.cloudinaryService = cloudinaryService; this.categoriesService = categoriesService; }
public EventsController(IEventsService eventsService, ICloudinaryService cloudinaryService) { this.eventsService = eventsService; this.cloudinaryService = cloudinaryService; }
public BannerController(IBannerService bannerService, ICloudinaryService cloudinaryService) { _bannerService = bannerService; _cloudinaryService = cloudinaryService; }
public PlayersController(IPlayersService playersService, ICloudinaryService cloudinaryService, IMapper mapper) { this.playersService = playersService; this.cloudinaryService = cloudinaryService; this.mapper = mapper; }
public PlayerController(IFootballPlayerService footballPlayerService, ICloudinaryService cloudinaryService) { this.footballPlayerService = footballPlayerService; this.cloudinaryService = cloudinaryService; }
public CarsController(ICarService carService, IModelCarService modelCarService, IMakeCarService makeCarService, IBodyCarService bodyCarService, ApplicationDbContext db, Cloudinary cloudinary, ICloudinaryService cloudinaryService, IFeatureService featureService, UserManager <ApplicationUser> userManager, IEngineService engineService) { this.carService = carService; this.modelCarService = modelCarService; this.makeCarService = makeCarService; this.bodyCarService = bodyCarService; this.db = db; this.cloudinary = cloudinary; this.cloudinaryService = cloudinaryService; this.featureService = featureService; this.userManager = userManager; this.engineService = engineService; }
public ProductsController(IProductsService productsServices, IIngredientsService ingredientsServices, ICloudinaryService cloudinaryServices) { this.productsServices = productsServices; this.ingredientsServices = ingredientsServices; this.cloudinaryServices = cloudinaryServices; }
public StadiumsController(IStadiumsService stadiumsService, ICloudinaryService cloudinaryService, IMapper mapper) { this.stadiumsService = stadiumsService; this.cloudinaryService = cloudinaryService; this.mapper = mapper; }
public ProductsController(IMapper mapper, IProductRepository productRepository, ICloudinaryService cloudinaryService, IFileManager fileManager) { _fileManager = fileManager; _mapper = mapper; _cloudinaryService = cloudinaryService; _productRepository = productRepository; }
public CitiesController(ICityRepository cityRepository, ICloudinaryService cloudinaryService, IFileManager fileManager) { _cityRepository = cityRepository; _cloudinaryService = cloudinaryService; _fileManager = fileManager; }
public MaterialService(NeoSchoolDbContext db, IHttpContextAccessor httpContextAccessor, ICloudinaryService cloudinaryService, IDisciplineService disciplineService) { this.db = db; this.httpContextAccessor = httpContextAccessor; this.cloudinaryService = cloudinaryService; this.disciplineService = disciplineService; }
public PhotosController(IDatingRepository repository, IMapper mapper, ICloudinaryService cloudinaryService) { _repository = repository; _mapper = mapper; _cloudinaryService = cloudinaryService; }
//for tests public UserController(ICreativeService CreativeService, IUserService UserService, ICloudinaryService CloudinaryService) { this.CreativeService = CreativeService; this.UserService = UserService; this.CloudinaryService = CloudinaryService; }
public ProductService(IDeletableEntityRepository <Product> productRepository, ICloudinaryService cloudinaryService) { this.productRepository = productRepository; this.cloudinaryService = cloudinaryService; }
public ToolsController(ICloudinaryService cloudinaryService) { this.cloudinaryService = cloudinaryService; }
public CloudinaryController(ICloudinaryService cloudinaryService, IMapper mapper) : base(mapper) { this.cloudinaryService = cloudinaryService; }
public ArticlesService(IDeletableEntityRepository <Article> articlesRepository, ICloudinaryService cloudinaryService) { this.articlesRepository = articlesRepository; this.cloudinaryService = cloudinaryService; }
public CoctailRepository(CoctailContext context, IMapper mapper, ICloudinaryService cloudinary) { _context = context; _mapper = mapper; _cloudinary = cloudinary; }
public PublicacionController(IAuthService auth, IPlanService PlanServ, IInmuebleTipoService InmTipServ, ICiudadService CiudServ, ICloudinaryService Cloudinary, IInmuebleService inmServ, IImageService ImagenServ, IPublicacionService publicServ, IValidacionInmueble valInm) { this.auth = auth; this.PlanServ = PlanServ; this.InmTipServ = InmTipServ; this.CiudServ = CiudServ; this.Cloudinary = Cloudinary; this.inmServ = inmServ; this.ImagenServ = ImagenServ; this.publicServ = publicServ; this.valInm = valInm; }
public UserService(IDeletableEntityRepository <ApplicationUser> userRepository, ICloudinaryService cloudinaryService) { this.userRepository = userRepository; this.cloudinaryService = cloudinaryService; }
public OrdersController(IOrdersService ordersService, ICustomersService customersService, IGarageService garageService, IItemsService itemsService, IOrderItemsService orderItemsService, ICloudinaryService cloudinaryService) { this.ordersService = ordersService; this.customersService = customersService; this.garageService = garageService; this.itemsService = itemsService; this.orderItemsService = orderItemsService; this.cloudinaryService = cloudinaryService; }
public NewsService(IDeletableEntityRepository <News> newsRepository, IDeletableEntityRepository <ApplicationUser> usersRepository, ICommentsService commentsService, ICloudinaryService cloudinary) { this.Cloudinary = cloudinary; this.NewsRepository = newsRepository; this.UsersRepository = usersRepository; this.CommentsService = commentsService; }
public ProductController(IProductService productService, ICloudinaryService cloudinaryService) { this.productService = productService; this.cloudinaryService = cloudinaryService; }
public ArticlesController(IArticlesService articlesService, ICloudinaryService cloudinaryService) { this.articlesService = articlesService; this.cloudinaryService = cloudinaryService; }
public FactsController(IFactsService factsService, ICloudinaryService cloudinaryService) { this.factsService = factsService; this.cloudinaryService = cloudinaryService; }
public ImageUploadHandler(IUnitOfWorkFactory unitOfWorkFactory, ICloudinaryService cloudinary) { _cloudinary = cloudinary; _unitOfWork = unitOfWorkFactory.Create(); }
public StudentsService(KidsManagementDbContext db, ICloudinaryService cloudinaryService) { this.db = db; this.cloudinaryService = cloudinaryService; }
public VehicleController(IVehicleService vehicleService, ICloudinaryService cloudinaryService) { _vehicleService = vehicleService; _cloudinaryService = cloudinaryService; }