예제 #1
0
 public ConfigurationController(ConfigurationDataService configurationDataService, ILogger <ConfigurationController> logger, IMapper mapper, UserLogin userLogin, IHttpContextAccessor httpContextAccessor)
 {
     _configurationDataService = configurationDataService;
     _mapper = mapper;
     _logger = logger;
     _httpContextAccessor = httpContextAccessor;
     _userProfile         = userLogin.UserProfile();
 }
        public void Retrieves_Data_From_Repository()
        {
            var mockRepsository = new Mock <IConfigurationDataRepository>();

            ConfigurationDataEntity expectedConfigurationData = new ConfigurationDataEntity();

            mockRepsository.Setup(repository => repository.LoadConfigurationData()).Returns(expectedConfigurationData);

            IConfigurationDataService service = new ConfigurationDataService(mockRepsository.Object);

            var result = service.Lookup();

            Assert.Same(expectedConfigurationData, result);
            mockRepsository.Verify(x => x.LoadConfigurationData(), Times.Once);
        }
예제 #3
0
        private IMigrationService CreateNonTransactionalMigrationService(IDataService dataService, IBulkImportService bulkImportService)
        {
            var localVersionService     = new LocalVersionService(_traceService);
            var tokenReplacementService = new TokenReplacementService(_traceService);
            var directoryService        = new DirectoryService();
            var fileService             = new FileService();

            var configurationService = new ConfigurationDataService(dataService, _traceService, tokenReplacementService);

            var migrationService = new NonTransactionalMigrationService(
                localVersionService,
                dataService,
                bulkImportService,
                configurationService,
                tokenReplacementService,
                directoryService,
                fileService,
                _traceService);

            return(migrationService);
        }
예제 #4
0
 public ConfigurationController(ConfigurationDataService configurationDataService, ILogger <ConfigurationController> logger, IMapper mapper, UserLogin userLogin)
 {
     _configurationDataService = configurationDataService;
     _mapper      = mapper;
     _userProfile = userLogin.UserProfile();
 }
예제 #5
0
 public HomeController(ILogger <HomeController> logger, IMapper mapper, ConfigurationDataService configurationDataService)
 {
     _logger = logger;
     _mapper = mapper;
     _configurationDataService = configurationDataService;
 }