Unit tests for commands, handlers, and aggregates #50

Open
opened 2026-03-14 23:55:00 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: test(event-sourcing): add unit tests for commands, handlers, and domain aggregates
  • Branch: feature/m1-v12-es-domain-tests

Background

Commands, handlers, and aggregates lack targeted unit tests.

Expected Behavior

BDD tests cover: all 16 commands with validation, all command handlers, all aggregate methods and event application.

Acceptance Criteria

  • Feature file with scenarios for command validation
  • Scenarios for handler execution
  • Scenarios for aggregate state transitions
  • Coverage >= 85% for commands.rb, command_handlers.rb, domain.rb

Subtasks

  • Extend tests/unit/features/event_sourcing.feature
  • Extend tests/unit/step_definitions/event_sourcing_steps.rb
  • Run bundle exec rake unit, verify coverage

Definition of Done

This issue is complete when all subtasks are done, commit created on the specified branch, PR submitted and merged.

## Metadata - **Commit Message**: `test(event-sourcing): add unit tests for commands, handlers, and domain aggregates` - **Branch**: `feature/m1-v12-es-domain-tests` ## Background Commands, handlers, and aggregates lack targeted unit tests. ## Expected Behavior BDD tests cover: all 16 commands with validation, all command handlers, all aggregate methods and event application. ## Acceptance Criteria - [ ] Feature file with scenarios for command validation - [ ] Scenarios for handler execution - [ ] Scenarios for aggregate state transitions - [ ] Coverage >= 85% for commands.rb, command_handlers.rb, domain.rb ## Subtasks - [ ] Extend `tests/unit/features/event_sourcing.feature` - [ ] Extend `tests/unit/step_definitions/event_sourcing_steps.rb` - [ ] Run `bundle exec rake unit`, verify coverage ## Definition of Done This issue is complete when all subtasks are done, commit created on the specified branch, PR submitted and merged.
freemo added this to the v1.2.0 milestone 2026-03-14 23:55:00 +00:00
freemo self-assigned this 2026-03-15 04:25:22 +00:00
freemo modified the milestone from v1.2.0 to v1.0.0 2026-03-15 23:19:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#50
No description provided.