Skip to content

Add unit tests for BaseEntity and fix repository registration#70

Merged
samuelzedec merged 1 commit intomainfrom
develop
Sep 2, 2025
Merged

Add unit tests for BaseEntity and fix repository registration#70
samuelzedec merged 1 commit intomainfrom
develop

Conversation

@samuelzedec
Copy link
Owner

@samuelzedec samuelzedec commented Sep 2, 2025

Summary

This pull request includes the following changes:

  • Added comprehensive unit tests for BaseEntity to cover equality checks, lifecycle methods, and domain events.
    • Implemented IEquatable<BaseEntity> and operator overloads (== and !=) for equality comparisons.
    • Improved consistency in hash code calculation and tested HashSet and Dictionary behavior using BaseEntity.
  • Fixed registration issue for IInvitationRepository, ensuring it correctly uses the implementation InvitationRepository.

Checklist

  • All relevant documentation has been updated or added if necessary.
  • Tests have been added or updated to cover the changes.
  • Code changes have been self-reviewed or peer-reviewed.
  • No other areas of the application are impacted by this PR.

…ents, and lifecycle methods

- Implemented unit tests for `BaseEntity` covering creation, equality, `UpdateEntity`, `DeleteEntity`, and domain events.
- Enhanced `BaseEntity` with `IEquatable<BaseEntity>` implementation and operator overloads (`==`, `!=`) for equality checks.
- Refactored `Equals` to compare entities by their IDs and introduced hash code consistency validation.
- Verified behavior with `HashSet` and `Dictionary` for key-based operations.
@samuelzedec samuelzedec merged commit 7acf256 into main Sep 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant