Ejemplo n.º 1
0
        public GenericComponentServiceUnitTests()
        {
            _optionsMocked             = Options.Create <AppSettings>(new AppSettings());
            _loggerMocked              = Mock.Of <ILogger>();
            _mapComponentsClientMocked = Mock.Of <IMapComponentsClient>();

            _genericComponentRepositoryMocked = Mock.Of <IGenericComponentRepository>();
        }
Ejemplo n.º 2
0
        public GenericComponentsImportService(IGenericComponentRepository genericComponentRepository, IOptions <AppSettings> options,
                                              ILogger logger, IMapComponentsClient mapComponentsClient)
        {
            _appSettings = options.Value;
            _logger      = logger;

            _genericComponentRepository = genericComponentRepository;
            _mapComponentsClient        = mapComponentsClient;
        }
        public GenericComponentRepositoryIntegrationTest()
        {
            MongoIntegrationTest.CreateConnection();

            _optionsMocked = new Mock <IOptions <AppSettings> >();
            _optionsMocked.Setup(i => i.Value).Returns(new AppSettings {
                CosmosDb = new CosmosDb {
                    ConnectionString = MongoIntegrationTest._runner.ConnectionString, Collection = "TestCollection", Database = "IntegrationTest"
                }
            });
            _genericComponents = GeneratorGenericComponents.GenerateGenericComponents();

            _genericComponentRepository = new GenericComponentRepository(_optionsMocked.Object);
        }
Ejemplo n.º 4
0
 public ProcessorService(IGenericDatabaseRepository <CPU> cpuRepo, IGenericComponentRepository componentRepo)
 {
     _cpuRepo       = cpuRepo;
     _componentRepo = componentRepo;
 }
Ejemplo n.º 5
0
 public DDRService(IGenericDatabaseRepository <DDR> ddrRepo, IGenericComponentRepository componentRepo)
 {
     _ddrRepo       = ddrRepo;
     _componentRepo = componentRepo;
 }
Ejemplo n.º 6
0
 public MainboardService(IGenericDatabaseRepository <Mainboard> mainboardRepo, IGenericComponentRepository componentRepo)
 {
     _mainboardRepo = mainboardRepo;
     _componentRepo = componentRepo;
 }
Ejemplo n.º 7
0
 public StorageService(IGenericDatabaseRepository <Storage> storageRepo, IGenericComponentRepository componentRepo)
 {
     _storageRepo   = storageRepo;
     _componentRepo = componentRepo;
 }
Ejemplo n.º 8
0
 public BatteryService(IGenericDatabaseRepository <Battery> batteryRepo, IGenericComponentRepository componentRepository)
 {
     _batteryRepo         = batteryRepo;
     _componentRepository = componentRepository;
 }
Ejemplo n.º 9
0
 public ComputerService(IGenericDatabaseRepository <Computer> computerRepo, IGenericComponentRepository componentRepo)
 {
     _computerRepo  = computerRepo;
     _componentRepo = componentRepo;
 }
Ejemplo n.º 10
0
 public GPUService(IGenericDatabaseRepository <GPU> gpuRepo, IGenericComponentRepository componentRepo)
 {
     _gpuRepo       = gpuRepo;
     _componentRepo = componentRepo;
 }