コード例 #1
0
ファイル: UpdateService.cs プロジェクト: Mikisto/ApiService2
 public UpdateService(IApiService apiService, IToDoListRepository todoRepository, IStaticDataService staticService, IIndustryJobUpdateService indyService, IAssetUpdateService assetUpdate, IInventionService inventionService, IManufacturingService manufacturingService, IMarketOrderUpdateService marketService, ITransactionService transactionService)
 {
     _apiService = apiService;
     _todoRepository = todoRepository;
     _staticService = staticService;
     _indyService = indyService;
     _assetUpdate = assetUpdate;
     _inventionService = inventionService;
     _manufacturingService = manufacturingService;
     _marketService = marketService;
     _transactionService = transactionService;
 }
コード例 #2
0
        public void SetUp()
        {
            _blueprints = TestHelpers.GetData<List<BlueprintInfo>>(typeof(BlueprintInfo).ToString());
            _productTypes = TestHelpers.GetData<List<ProductType>>(typeof(ProductType).ToString());

            var staticMock = new Mock<IStaticRepository>();
            staticMock.Setup(p => p.GetAllAsync<BlueprintInfo>()).ReturnsAsync(_blueprints);
            staticMock.Setup(p => p.GetAllAsync<ProductType>()).ReturnsAsync(_productTypes);

            var staticService = new StaticDataService(staticMock.Object);

            var apiMock = new Mock<IApiRepository>();
            apiMock.Setup(p => p.GetMarketStatisticsAsync(It.IsAny<List<int>>(), It.IsAny<int>())).Returns(DummyPrices());
            apiMock.Setup(p => p.GetApiData<BlueprintApi>(It.IsAny<Credential>(), CallContext.Corp, CallEndPoint.Blueprints)).Returns(CreateDummyBlueprints());
            _apiService = new EveApi.ApiService(apiMock.Object);

            var todoMock = new Mock<IToDoListRepository>();

            var manufacturingService = new ManufacturingService(staticService, _apiService, new BlueprintRepository(_apiService, todoMock.Object), todoMock.Object);

            _inventionService = new InventionService(_apiService, manufacturingService, staticService);
        }
コード例 #3
0
 public InventionsController(IInventionService inventionService, ILogService loggerService, IInventAppContext inventAppContext) : base(inventionService, loggerService, inventAppContext)
 {
     _inventionService = inventionService;
 }