Commit dd7faf1
Add comprehensive unit tests for DirectorService
Created 28 comprehensive unit tests covering all public methods:
- GetDashboardAsync (2 tests)
- GetKeyMetricsAsync (2 tests)
- GetRecruitmentFunnelAsync (2 tests)
- GetOffersOverviewAsync (1 test)
- GetStaffPerformanceAsync (1 test)
- AddStaffMemberAsync (4 tests)
- UpdateStaffMemberAsync (2 tests)
- RemoveStaffMemberAsync (2 tests)
- GetScholarshipsAsync (2 tests)
- ApproveScholarshipAsync (3 tests)
- RescindScholarshipAsync (3 tests)
- Authorization methods (4 tests)
Test coverage includes:
- Happy path scenarios with valid data
- Authorization/permission checks
- Validation error cases
- Edge cases (empty data, null values)
- Exception handling (KeyNotFoundException, UnauthorizedAccessException, InvalidOperationException)
Used TestBase, MockQueryable.Moq, FluentAssertions, and AAA pattern.
All 28 tests pass successfully.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 9911b21 commit dd7faf1
File tree
1 file changed
+906
-0
lines changed- Backend/Podium/Podium.Tests/Unit/Services
1 file changed
+906
-0
lines changed
0 commit comments