Skip to content

Expand unit coverage for report calculations and edge cases #597

Description

@StuartFerguson

Problem

The repository has broad integration coverage, but business-logic unit coverage is comparatively limited. Important calculations and edge conditions are concentrated in the large reporting manager.

Relevant areas:

  • EstateReportingAPI.BusinessLogic.UnitTests
  • EstateReportingAPI.Tests
  • EstateReportingAPI.IntegrationTests
  • EstateReportingAPI.BusinessLogic/ReportingManager.cs

Scope

Add focused tests for:

  • Empty datasets.
  • Date boundaries and invalid ranges.
  • Failed/declined transaction totals.
  • Settlement and fee totals.
  • Merchant/operator aggregation.
  • Duplicate or missing balance entries.
  • Pagination and maximum query limits.
  • Tenant isolation behavior.

Acceptance criteria

  • Core report calculations have direct unit tests.
  • Edge-case tests assert both result values and failure/not-found behavior.
  • Integration tests remain focused on HTTP, authentication, serialization, and database wiring.
  • The test suite documents the expected behavior for zero-result reports.
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions