Skip to content

SCRUM-327: fix(rewards) register excel parser in DI, adopt Result pattern, and add unit tests for voucher upload - #374

Merged
Moha-sami merged 1 commit into
mainfrom
fix/scrum-327-reward-upload-vouchers-safety-and-tests
Sep 20, 2026
Merged

Moha-sami merged 1 commit into
mainfrom
fix/scrum-327-reward-upload-vouchers-safety-and-tests

Conversation

@Moha-sami

Copy link
Copy Markdown
Owner

Summary

  • Register \IExcelVoucherParserService\ in Dependency Injection to fix runtime \InvalidOperationException\ (500)
  • Adopt \Result\ pattern instead of throwing exceptions
  • Remove broken \GetCurrentUserId()\ that threw \NotImplementedException\
  • Safely parse \BatchId\ with fallback generation for non-numeric batch strings
  • Fix CA2024 warning in \ExcelVoucherParser\
  • Add 14 comprehensive unit tests in \UploadRewardVouchersCommandTests\ covering all preview, commit, validation, and controller flows (748 tests passing, 0 warnings)

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hr-system Ready Ready Preview Sep 20, 2026 6:11pm UTC

@github-actions

Copy link
Copy Markdown

Automated PR Validation Feedback

Action Needed on this Pull Request:

  • Code Formatting Failed: 5 changed C# file(s) do not match formatting rules. Run dotnet format locally on your changed files and commit the result.

Please push a fix to your branch to re-run validation!

@Moha-sami
Moha-sami merged commit 8ae7d87 into main Sep 20, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview cc9cff46 Deployed Sep 20, 2026 by vercel[bot]
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