Conversation
Contributor
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| C# | Feb 28, 2026 6:00a.m. | Review ↗ | |
| Test coverage | Feb 28, 2026 6:01a.m. | Review ↗ |
Code Coverage Summary
| Language | Line Coverage (New Code) | Line Coverage (Overall) |
|---|---|---|
| Aggregate | 100% [✓ above threshold] |
54.8% [⤫ below threshold] |
| C# | 100% |
54.8% |
➟ Additional coverage metrics may have been reported. See full coverage report ↗
Contributor
There was a problem hiding this comment.
Pull request overview
Adds broad NUnit/FluentAssertions unit-test coverage across the Shared, Presentation, and API layers, plus a small UI-state bug fix in WardrobeViewModel to support the new tests.
Changes:
- Added many new unit tests for Shared DTOs/models/static resources and Presentation view models/services/identity components.
- Added a comprehensive API test suite for endpoints, middleware, repositories, services, and database behaviors (plus EF Core test dependencies).
- Fixed
WardrobeViewModel.UpdateActionDialogStateto setShowEditforActionType.Edit(previously toggled delete).
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| WardrobeManager.Shared.Tests/WardrobeManager.Shared.Tests.csproj | Normalizes project file header/formatting. |
| WardrobeManager.Shared.Tests/StaticResources/StaticValidatorsTests.cs | Adds tests for shared static validator registry behavior. |
| WardrobeManager.Shared.Tests/StaticResources/ProjectConstantsTests.cs | Adds tests for shared constant values and basic formatting checks. |
| WardrobeManager.Shared.Tests/StaticResources/MiscMethodsTests.cs | Adds tests for MiscMethods helpers (emoji/name formatting/base64/etc). |
| WardrobeManager.Shared.Tests/Models/ResultTests.cs | Adds tests for Result<T> record behavior. |
| WardrobeManager.Shared.Tests/Models/NewOrEditedClothingItemDTOTests.cs | Adds tests for NewClothingItemDTO defaults/mutation. |
| WardrobeManager.Shared.Tests/Models/FilterModelTests.cs | Adds tests for FilterModel defaults/mutation. |
| WardrobeManager.Shared.Tests/Models/EditedUserDTOTests.cs | Adds tests for EditedUserDTO construction/mutation. |
| WardrobeManager.Shared.Tests/DTOs/LogDTOTests.cs | Adds tests for LogDTO property set behavior. |
| WardrobeManager.Presentation/ViewModels/WardrobeViewModel.cs | Fixes edit-dialog flag assignment (ShowEdit vs ShowDelete). |
| WardrobeManager.Presentation.Tests/ViewModels/WardrobeViewModelTests.cs | Adds tests for wardrobe loading, deleting, and dialog-state logic. |
| WardrobeManager.Presentation.Tests/ViewModels/SignupViewModelTests.cs | Adds tests for signup flow behaviors. |
| WardrobeManager.Presentation.Tests/ViewModels/NavBarViewModelTests.cs | Adds tests for nav bar view model state and logout behavior. |
| WardrobeManager.Presentation.Tests/ViewModels/LoginViewModelTests.cs | Adds tests for login flow behaviors and enter-key handling. |
| WardrobeManager.Presentation.Tests/ViewModels/HomeViewModelTests.cs | Adds basic instantiation test for HomeViewModel. |
| WardrobeManager.Presentation.Tests/ViewModels/DashboardViewModelTests.cs | Adds basic instantiation test for DashboardViewModel. |
| WardrobeManager.Presentation.Tests/ViewModels/AddClothingItemViewModelTests.cs | Adds tests for submit validation, notifications, and enum collections. |
| WardrobeManager.Presentation.Tests/Services/NotificationServiceTests.cs | Adds tests for notification add/remove and OnChange firing. |
| WardrobeManager.Presentation.Tests/Services/IdentityServiceTests.cs | Adds tests for identity service wrapper behavior and notifications. |
| WardrobeManager.Presentation.Tests/Identity/UserInfoTests.cs | Adds tests for identity UserInfo defaults/mutation. |
| WardrobeManager.Presentation.Tests/Identity/CookieHandlerTests.cs | Adds tests for CustomHttpMessageHandler (headers/errors). |
| WardrobeManager.Presentation.Tests/Identity/CookieAuthenticationStateProviderTests.cs | Adds tests for cookie auth provider login/register/auth-state parsing. |
| WardrobeManager.Presentation.Tests/Helpers/FakeNavigationManager.cs | Adds a test helper NavigationManager implementation. |
| WardrobeManager.Presentation.Tests/ApiServiceTests.cs | Extends API client tests for connectivity, logging, onboarding, clothing CRUD. |
| WardrobeManager.Api/Middleware/GlobalExceptionHandler.cs | Changes exception handler visibility to public (to support testing). |
| WardrobeManager.Api.Tests/WardrobeManager.Api.Tests.csproj | Adds EF Core InMemory/Sqlite packages and normalizes formatting. |
| WardrobeManager.Api.Tests/Services/UserServiceTests.cs | Adds tests for UserService behaviors (admin checks, update/delete/create). |
| WardrobeManager.Api.Tests/Services/FileServiceTests.cs | Adds tests for image save/get/delete behaviors and size limit enforcement. |
| WardrobeManager.Api.Tests/Services/DataDirectoryServiceTests.cs | Adds tests for directory path creation/structure and configuration errors. |
| WardrobeManager.Api.Tests/Repositories/GenericRepositoryTests.cs | Adds tests for generic repository CRUD/save behaviors. |
| WardrobeManager.Api.Tests/Repositories/ClothingRepositoryTests.cs | Adds tests for user-scoped clothing repository queries. |
| WardrobeManager.Api.Tests/Middleware/UserCreationMiddlewareTests.cs | Adds tests for user creation middleware context behavior. |
| WardrobeManager.Api.Tests/Middleware/LoggingMiddlewareTests.cs | Adds tests for request logging middleware behavior. |
| WardrobeManager.Api.Tests/Middleware/GlobalExceptionHandlerTests.cs | Adds tests for exception handler status code and logging behavior. |
| WardrobeManager.Api.Tests/Helpers/AsyncQueryHelper.cs | Adds helper to emulate async queryable enumeration in tests. |
| WardrobeManager.Api.Tests/Endpoints/UserEndpointsTests.cs | Adds tests for user endpoints returning expected results and calling services. |
| WardrobeManager.Api.Tests/Endpoints/MiscEndpointsTests.cs | Adds tests for ping/auth messaging and log endpoint mapping/calls. |
| WardrobeManager.Api.Tests/Endpoints/ImageEndpointsTests.cs | Adds tests for image endpoint delegating to file service. |
| WardrobeManager.Api.Tests/Endpoints/IdentityEndpointsTests.cs | Adds tests for onboarding identity endpoints and roles/logout behaviors. |
| WardrobeManager.Api.Tests/Endpoints/ClothingEndpointsTests.cs | Adds tests for clothing endpoints validation and service calls. |
| WardrobeManager.Api.Tests/Database/Entities/ClothingItemTests.cs | Adds tests for entity wear/wash counters and defaults. |
| WardrobeManager.Api.Tests/Database/DatabaseInitializerTests.cs | Adds tests for role creation and early-return behavior. |
| WardrobeManager.Api.Tests/Database/DatabaseContextTests.cs | Adds tests for DbSet presence and relationship/cascade behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ctors Co-authored-by: m-GDEV <65223925+m-GDEV@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.