diff --git a/src/2-business/repositories/iExchangeRateRepository.ts b/src/2-business/repositories/iExchangeRateRepository.ts index e6784c3..823ddec 100644 --- a/src/2-business/repositories/iExchangeRateRepository.ts +++ b/src/2-business/repositories/iExchangeRateRepository.ts @@ -1,5 +1,7 @@ import { ExchangeRate } from '../../1-domain/entities/exchangeRate' +import { CurrencyEnum } from '../enums/currencyEnum' export interface IExchangeRateRepository { upsert (entity: ExchangeRate): Promise + get (baseCurrency: CurrencyEnum): Promise } diff --git a/test/unit/2-business/exchangeRate/updateExchangeRateUseCase.test.ts b/test/unit/2-business/exchangeRate/updateExchangeRateUseCase.test.ts index cc6ca33..d99a361 100644 --- a/test/unit/2-business/exchangeRate/updateExchangeRateUseCase.test.ts +++ b/test/unit/2-business/exchangeRate/updateExchangeRateUseCase.test.ts @@ -40,7 +40,8 @@ describe('UpdateExchangeRateUseCase', () => { const setMocks = () => { exchangeRateRepository = { - upsert: jest.fn().mockResolvedValue(null) + upsert: jest.fn().mockResolvedValue(null), + get: jest.fn() } exchangeRateService = { getLatestRates: jest.fn().mockResolvedValue(exchangeRateResponseMock) diff --git a/test/unit/3-adpters/exchangeRate/updateExchangeRateController.test.ts b/test/unit/3-adpters/exchangeRate/updateExchangeRateController.test.ts index d63fe42..2b0d8c1 100644 --- a/test/unit/3-adpters/exchangeRate/updateExchangeRateController.test.ts +++ b/test/unit/3-adpters/exchangeRate/updateExchangeRateController.test.ts @@ -28,7 +28,8 @@ describe('UpdateExchangeRateController', () => { const setMocks = () => { exchangeRateRepository = { - upsert: jest.fn().mockResolvedValue(null) + upsert: jest.fn().mockResolvedValue(null), + get: jest.fn().mockResolvedValue(null) } exchangeRateService = { getLatestRates: jest.fn().mockResolvedValue(exchangeRateResponseMock)