Skip to content

Add comprehensive unit tests for ExchangeRateProvider with MCP Server integration #249

Description

@rstropek

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/ or xchg-logic/tests/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions