-
Notifications
You must be signed in to change notification settings - Fork 293
Add comprehensive unit tests for ExchangeRateProvider with MCP Server integration #249
Copy link
Copy link
Open
Description
Description
The ExchangeRateProvider in the Xchg project needs comprehensive unit tests to ensure reliability and correctness when integrating with the Exchange Rate Provider MCP Server.
Scope
- Add unit tests for all public methods of ExchangeRateProvider
- Test error handling scenarios (invalid rates, missing currencies, etc.)
- Test integration with MCP Exchange Rate Server data
- Ensure proper validation of exchange rates and currency codes
- Test currency management (add, remove, update)
Implementation Details
- Tests should be added to the xchg-logic crate
- Use realistic exchange rate data from the MCP server for testing
- Cover edge cases like invalid rates, duplicate currencies, and missing data
- Ensure proper error handling and meaningful error messages
Acceptance Criteria
- All public methods of ExchangeRateProvider are tested
- Error scenarios are properly covered
- Tests use real exchange rate data from MCP server
- All tests pass successfully
- Code coverage is adequate for the module
Files to modify
xchg-logic/src/lib.rs(if test module needs to be added)- Add test files in
xchg-logic/src/orxchg-logic/tests/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels