Skip to content

Quality: Add Unit Tests for apis-web and apis-main Controllers #93

@krrish175-byte

Description

@krrish175-byte

Description:

The current test coverage is extremely low. apis-web has only 1 test file, and apis-main has only 6. Critical logic for deal generation, logging, and grid master control is largely untested, making the system fragile and prone to regressions during refactoring.

Goal:

Add basic unit tests (using JUnit 5 and Vert.x Unit) for key components to ensure stability.

Scope:

  1. apis-web:

    • Create tests for DealGeneration.java to verify it correctly parses requests and sends messages to the EventBus.
    • Create tests for LogConfiguration.java
  2. apis-main:

    • Add tests for DealManagement.java to verify logic for deal creation and validation.
    • Add tests for InterlockUtil.java to verify locking mechanics.

Acceptance Criteria:

  • At least 5 new test classes added covering the scope above.
  • Tests must pass (mvn test).
  • Tests should mock external dependencies (like the EventBus) where appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions