public BaseApiTest() { // Arrange test enviromnent var builder = new WebHostBuilder(); builder.ConfigureAppConfiguration((hostingContext, config) => { config.SetBasePath(Directory.GetCurrentDirectory()); config.AddJsonFile("config/appsettings.json", optional: true, reloadOnChange: true); config.AddJsonFile( $"config/appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", optional: true); config.AddEnvironmentVariables(); }) .UseStartup <Startup>(); // Load environment variables LoadEnvironmentVariables(); // Start test server TestServer testServer = new TestServer(builder); _apiClient = testServer.CreateClient(); // Set services _testService = testServer.Services.GetService <ITestService>(); _infrastructure = testServer.Services.GetService <IInfrastructureService>(); // Crate fake HttpContext CreateDefaultHttpContext(); }
public ReservationService(IUnitOfWork unitOfWork, IInfrastructureService infrastructureService) { _unitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork)); _infrastructureService = infrastructureService ?? throw new ArgumentNullException(nameof(infrastructureService)); _validationRules = new List <ISeatValidation>(); UseDefaultRules(); }
public DeleteCategoryHandler(IExtendedCategoryService extendedCategoryService, ILocalizationService localizationService, IInfrastructureService infrastructureService, ICustomerService customerService) { _extendedCategoryService = extendedCategoryService; _localizationService = localizationService; _infrastructureService = infrastructureService; _customerService = customerService; }
public ApiControllerBase(IInfrastructureService infrastructure) { Configuration = infrastructure.Configuration; LogEngine = infrastructure.LogEngine; Localizer = infrastructure.Localizer; Mapper = infrastructure.Mapper; }
public RecoveryPasswordHandler(IWorkflowMessageService workflowService, ICustomerService customerService, IInfrastructureService infrastructureService) { _workflowService = workflowService; _customerService = customerService; _infrastructureService = infrastructureService; }
public AdminController(IUnitOfWorkInt unitOfWork, IMedDraService meddraService, IInfrastructureService infrastuctureService) { Check.IsNotNull(meddraService, "meddraService may not be null"); _unitOfWork = unitOfWork; _meddraService = meddraService; _infrastuctureService = infrastuctureService; }
//protected readonly PublicApiConfiguration PublicApiConfiguration; public ServiceBase(IInfrastructureService infrastructure, IHttpContextAccessor httpContextAccessor, IHttpClientFactory httpClientFactory) { Configuration = infrastructure.Configuration; LogEngine = infrastructure.LogEngine; Mapper = infrastructure.Mapper; HttpContextAccessor = httpContextAccessor; //PublicApiConfiguration = infrastructure.OptionsPublicApiConfiguration.Value; HttpClientFactory = httpClientFactory; }
public ServiceBase(IInfrastructureService infrastructure, IHttpContextAccessor httpContextAccessor, ApplicationDbContext db) { _configuration = infrastructure.Configuration; _log = infrastructure.Log; _localizer = infrastructure.Localizer; _enumsManager = infrastructure.EnumsManager; _httpContextAccessor = httpContextAccessor; _db = db; }
public CausalityReportQueryHandler( IReportInstanceQueries reportInstanceQueries, IInfrastructureService infrastructureService, ILinkGeneratorService linkGeneratorService, ILogger <CausalityReportQueryHandler> logger) { _reportInstanceQueries = reportInstanceQueries ?? throw new ArgumentNullException(nameof(reportInstanceQueries)); _infrastructureService = infrastructureService ?? throw new ArgumentNullException(nameof(infrastructureService)); _linkGeneratorService = linkGeneratorService ?? throw new ArgumentNullException(nameof(linkGeneratorService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public MessageTokenProviderExtended(IStoreService storeService, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor, IGenericAttributeService genericAttributeService, StoreInformationSettings storeInformationSettings, IInfrastructureService infrastructureService) : base(storeService, urlHelperFactory, actionContextAccessor, genericAttributeService, storeInformationSettings) { _infraService = infrastructureService; }
public InfrastructureController(IInfrastructureService infrastructureService) { _infrastructureService = infrastructureService; }
public HomeController(ILogger <HomeController> logger, IInfrastructureService infrastructureService) { _logger = logger; _infrastructureService = infrastructureService; }
public string RegisterInfrastructureService(Guid partitionId, long replicaId, IInfrastructureService service) { return("Test"); }
public TestService(IInfrastructureService infrastructure, IHttpContextAccessor httpContextAccessor, ApplicationDbContext db) : base(infrastructure, httpContextAccessor, db) { }
public CreateAccountHandler(ICustomerRegistrationService customerRegistration, IInfrastructureService infrastructureService) { _customerRegistration = customerRegistration; _infrastructureService = infrastructureService; }
private string RegisterInfrastructureServiceHelper(Guid partitionId, long replicaId, IInfrastructureService service) { InfrastructureServiceBroker broker = new InfrastructureServiceBroker(service); NativeCommon.IFabricStringResult nativeString = this.nativeAgent.RegisterInfrastructureService( partitionId, replicaId, broker); return(StringResult.FromNative(nativeString)); }
public GetCategoriesShortInfoHandler(IExtendedCategoryService categoryService, IInfrastructureService infrastructureService) { _categoryService = categoryService; _infrastructureService = infrastructureService; }
internal InfrastructureServiceBroker(IInfrastructureService service) { this.service = service; }
public string RegisterInfrastructureService(Guid partitionId, long replicaId, IInfrastructureService service) { Requires.Argument <Guid>("partitionId", partitionId).NotNull(); return(Utility.WrapNativeSyncInvokeInMTA(() => this.RegisterInfrastructureServiceHelper(partitionId, replicaId, service), "InfrastructureServiceAgent.RegisterInfrastructureService")); }
//private readonly IMongoCollection<User> UsersCollection; public TestController(IInfrastructureService infrastructure, IMongoClient mongoDbClient) : base(infrastructure) { MongoDbDbClient = mongoDbClient; }
public void OneTimeSetup() { _mockingHelper = new MockingHelper(); _infrastructureService = _mockingHelper.ServiceFactory.Object.CreateInfrastructureService(); }
public string RegisterInfrastructureService(Guid partitionId, long replicaId, IInfrastructureService service) { return(agent.RegisterInfrastructureService(partitionId, replicaId, service)); }
public string RegisterInfrastructureService(Guid partitionId, long replicaId, IInfrastructureService service) { if (RegisterInfrastructureServiceFunc != null) { return(RegisterInfrastructureServiceFunc(partitionId, replicaId, service)); } string registrationId = string.Format(CultureInfo.InvariantCulture, "P{0}_R{1}", partitionId, replicaId); return(registrationId); }
public string RegisterInfrastructureService(Guid partitionId, long replicaId, IInfrastructureService service) { // This endpoint, returned from ChangeRole, is not used when InfrastructureService is run as a user application return("{0}:{1}".ToString(partitionId, replicaId)); }