-
Notifications
You must be signed in to change notification settings - Fork 294
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/
Metadata
Metadata
Assignees
Labels
No labels