//TODO INSERTION API NEEDED /// <summary> /// Called before each test /// </summary> public ResourceDemandTest() { var loggerDemand = new Mock <ILogger <ResourceDemandQueryService> >(); var addressMaker = new Mock <IAddressMaker>(); addressMaker.Setup(m => m.SetCoordinates(It.IsAny <AddressEntity>())).Callback((AddressEntity a) => { a.Latitude = 0; a.Longitude = 0; a.HasCoordinates = false; }); _resourceDemandQueryService = new ResourceDemandQueryService(loggerDemand.Object, ResourceContext, addressMaker.Object); _resourceDemandUpdateService = new ResourceDemandUpdateService(ResourceContext, addressMaker.Object); _captainHookGenerator = new CaptainHookGenerator(); }
public DemandController( ILogger <DemandController> logger, IResourceDemandQueryService resourceDemandQueryService, IResourceDemandInputValidatorService resourceDemandInputValidatorService, IResourceDemandUpdateService resourceDemandUpdateService, IMailInputValidatorService mailInputValidatorService, IMailService mailService, IConfigurationService configurationService ) { _logger = logger; _resourceDemandQueryService = resourceDemandQueryService; _resourceDemandInputValidatorService = resourceDemandInputValidatorService; _resourceDemandUpdateService = resourceDemandUpdateService; _mailInputValidatorService = mailInputValidatorService; _mailService = mailService; _configurationService = configurationService; _adminKey = Environment.GetEnvironmentVariable("PIRAT_ADMIN_KEY"); _languageDE = configurationService.GetConfigForRegion("de").Languages["de"]; _languageEN = configurationService.GetConfigForRegion("de").Languages["en"]; }