diff --git a/apps/api/src/app/portfolio/current-rate.service.spec.ts b/apps/api/src/app/portfolio/current-rate.service.spec.ts index 0dd2b3a68..f72c1f3ec 100644 --- a/apps/api/src/app/portfolio/current-rate.service.spec.ts +++ b/apps/api/src/app/portfolio/current-rate.service.spec.ts @@ -6,6 +6,7 @@ import { DataSource, MarketData } from '@prisma/client'; import { CurrentRateService } from './current-rate.service'; import { GetValuesObject } from './interfaces/get-values-object.interface'; +import { DataGatheringService } from '@ghostfolio/api/services/data-gathering/data-gathering.service'; jest.mock('@ghostfolio/api/services/market-data/market-data.service', () => { return { @@ -89,6 +90,7 @@ describe('CurrentRateService', () => { let exchangeRateDataService: ExchangeRateDataService; let marketDataService: MarketDataService; let propertyService: PropertyService; + let dataGatheringService: DataGatheringService; beforeAll(async () => { propertyService = new PropertyService(null); @@ -109,10 +111,21 @@ describe('CurrentRateService', () => { ); marketDataService = new MarketDataService(null); + dataGatheringService = new DataGatheringService( + null, + null, + dataProviderService, + exchangeRateDataService, + marketDataService, + null, + null + ); + await exchangeRateDataService.initialize(); currentRateService = new CurrentRateService( dataProviderService, + dataGatheringService, exchangeRateDataService, marketDataService ); diff --git a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts index c66323c72..db79afa4b 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts index 9f49c13e0..09bb9d433 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts index 666ce2167..c7b9ee04d 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator-no-orders.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-no-orders.spec.ts index a26426017..05da052fc 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-no-orders.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-no-orders.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts index 6adfc9347..514456af6 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts index feed5923b..15dc25cfb 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts @@ -18,7 +18,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('get current positions', () => { diff --git a/apps/api/src/app/portfolio/portfolio-calculator.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator.spec.ts index 23f0a8a8d..33b8ab0dd 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator.spec.ts @@ -7,7 +7,7 @@ describe('PortfolioCalculator', () => { let currentRateService: CurrentRateService; beforeEach(() => { - currentRateService = new CurrentRateService(null, null, null); + currentRateService = new CurrentRateService(null, null, null, null); }); describe('annualized performance percentage', () => {