Skip to content

Improve test coverage for Opportunity validation logic #693

@sonalguptaabd-bit

Description

@sonalguptaabd-bit

Summary

Recent refactors in Opportunity validation introduced custom exceptions
to separate business logic from trigger/UI handling.

However, current test coverage is limited and does not fully assert
negative scenarios or exception behavior.

Suggested Solution

Add unit tests for Opportunity validation to cover:

  • Invalid stage + probability combinations
  • Missing required fields
  • Proper custom exception handling

Ensure that all existing tests continue to pass and no production
logic is modified.

Alternative Solutions

None considered. The best approach is to add targeted test cases
without modifying existing validation logic.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions