Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview of the Solution
This project showcases a method for updating exchange rates by leveraging the CNB API and applying filters to target a specific set of currencies.
Project Structure
1. Console Application
The ExchangeRateUpdater.ConsoleUI serves as the entry point for the application, managing startup and dependency injection (DI). It also provides an example of how to use the API effectively.
2. Core Library
The ExchangeRateUpdater.Core library contains the primary logic and functionality of the solution. It includes utilities such as extensions, API adapters, and related components.
To simplify the design, all code resides within this library rather than being split into multiple modules.
A customizable API adapter design enables seamless integration with different exchange rate providers, adhering to the IExchangeRateApiAdapter interface.
The ExchangeRateProvider ensures that responsibilities remain clear and aligned with the Single Responsibility Principle.
3. Testing Framework
ExchangeRateUpdater.Testing: A utility-focused library built to streamline the creation of parallel tests. It reflects a personal testing style that prioritizes speed and clarity but can be extended with features like logging or test cancellation if needed.
ExchangeRateUpdater.Core.TestingSupport: A supplementary library offering tools for writing tests. While not essential for this task, it represents how production-level code is typically structured.
4. Unit and Integration Tests
The ExchangeRateUpdater.Core.UnitTests and ExchangeRateUpdater.Core.IntegrationTests libraries include sample tests to demonstrate the testing framework. Only a subset of classes is tested to keep the solution concise and focused.
This approach balances clarity, modularity, and extensibility, ensuring the solution is both practical and adaptable.