Skip to content

Service interfaces for testability #20

Description

@rammrain

Summary

Define interfaces for all core SDK services so consumers can mock the SDK in their tests.

Requirements

  • OrderService interface — create order, get order status
  • PaymentMethodService interface — get available payment methods
  • TokenService interface — generate token, validate token
  • Default implementations backed by the HTTP client
  • Consumers can provide their own implementations or mock these in tests

Refs

  • initial-docs/project1.md — interfaces for core services, testability
  • initial-docs/project2.md — consumer-supplied HTTP client

Testing

Unit tests for default implementations (via stubbed HTTP). Verify interfaces are mockable with standard tools (Mockito). Target near-perfect coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions