-
Notifications
You must be signed in to change notification settings - Fork 0
Rename servicecatalogs phase1c #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rastructure) - Renamed Domain layer: entities, value objects, repositories, events - Renamed Infrastructure layer: DbContext, migrations, repositories - Updated namespaces to MeAjudaAi.Modules.ServiceCatalogs - Updated solution file to reference new paths - Updated Shared validation constants Files: 32 (Domain + Infrastructure layers) Phase: 1a of 3 Next: Phase 1b will add Application + API layers
…+ API) - Renamed Application layer: commands, queries, handlers, DTOs, ModuleApi - Renamed API layer: endpoints, extensions - Updated all namespaces and class references - Renamed ServiceCatalogsModuleApi and related files Files: 68 (Application + API layers) Phase: 1b of 3 Next: Phase 1c will add Tests layer
- Renamed Tests layer: unit tests, integration tests, builders - Updated test base classes and infrastructure - Renamed ServiceCatalogsIntegrationTestBase - All module tests now reference ServiceCatalogs namespace Files: 31 (Module Tests) Phase: 1c of 3 Next: Phase 2 will update Shared contracts, external tests, and documentation
…s + Docs) - Updated Shared contracts: IServiceCatalogsModuleApi, DTOs - Updated Integration/E2E tests in tests/ folder - Updated documentation: catalogs.md -> service_catalogs.md - Updated infrastructure scripts - Updated architecture and roadmap references Files: 18 (Shared + External Tests + Docs) Phase: 2 of 2 (Final) This completes the Catalogs -> ServiceCatalogs renaming. Total files across all phases: ~147 All phases: < 70 files each ✓
…and apply code review fixes
Resolved conflicts by accepting Phase 1b improvements from master: - Updated ServiceCatalogs GUIDs (Application: A7B8C9D0..., API: B1C2D3E4...) - Accepted all code review improvements (XML docs, DTO mapping, validation consistency) - Removed Tests folder references (will be added in Phase 1c) - Kept Phase 1b enhancements: relative routes, Guid.Empty validation, DtoMappingExtensions
- Added Tests folder and project to MeAjudaAi.sln - Included 30 test files: Unit tests (Domain, Application handlers) and Integration tests - Test infrastructure: Builders, GlobalTestConfiguration, TestBase classes - Verified build: All tests compile successfully
- Removed TemporaryModuleDtos.cs and integrated shared contracts - Uncommented IServiceCatalogsModuleApi interface implementation - Updated ValidateServicesEndpoint to use IServiceCatalogsModuleApi interface - Adjusted ModuleServiceDto (removed DisplayOrder) and ModuleServiceListDto (added CategoryId) to match shared contracts - Added ServiceCatalogs project references to E2E and Integration test projects - All module renames verified: * Search → SearchProviders ✅ * Location → Locations ✅ * Catalogs → ServiceCatalogs ✅ - Build successful across all projects
|
Warning Rate limit exceeded@frigini has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 5 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (6)
WalkthroughRenames the Catalogs module to ServiceCatalogs across code, docs, tests and solution; adds ServiceCatalogs test project and root Tests project; introduces IServiceCatalogsModuleApi and DTOs; implements DI and handler registrations; removes temporary DTOs; adds extensive unit/integration tests and test infrastructure; updates solution/project entries and DB schema naming. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant API as Validate Endpoint
participant IApi as IServiceCatalogsModuleApi
participant ApiImpl as ServiceCatalogsModuleApi
participant Repo as ServiceRepository
Note over Client,API: Validate services flow (high level)
Client->>API: POST /services/validate { ids }
API->>IApi: ValidateServicesAsync(ids, ct)
IApi->>ApiImpl: interface dispatch
ApiImpl->>Repo: GetByIdsAsync(ids, ct)
Repo-->>ApiImpl: services[]
ApiImpl-->>IApi: ModuleServiceValidationResultDto
IApi-->>API: Result<DTO>
API-->>Client: 200 OK + validation result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas needing focused review:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs (1)
9-12: Update class name and comments to reflect ServiceCatalogs rename.The using directive was updated to
ServiceCatalogs(line 4), but the class name and comments still reference "Catalogs". For consistency with the broader module rename:Apply this diff to update the class name and comments:
/// <summary> -/// Testes de integração entre o módulo Catalogs e outros módulos +/// Testes de integração entre o módulo ServiceCatalogs e outros módulos /// Demonstra como o módulo de catálogos pode ser consumido por outros módulos /// </summary> -public class CatalogsModuleIntegrationTests : TestContainerTestBase +public class ServiceCatalogsModuleIntegrationTests : TestContainerTestBaseinfrastructure/test-database-init.sh (1)
76-103: Update test script schema and role names to match actual database initializationThe test script contains incorrect schema and role names that do not match the actual database initialization:
- Schema mismatch: Test expects
service_service_catalogs, but actual SQL createscatalogs- Role mismatch: Test expects
service_catalogs_roleandservice_catalogs_owner, but actual SQL createscatalogs_roleandcatalogs_ownerThe validation will fail even though the database is correctly initialized.
Update lines 77 and 102–103 in
infrastructure/test-database-init.sh(and corresponding lines in.ps1):
- Replace
"service_service_catalogs"with"catalogs"in SCHEMAS- Replace
"service_catalogs_role" "service_catalogs_owner"with"catalogs_role" "catalogs_owner"in ROLESdocs/architecture.md (1)
118-127: Naming inconsistency between documentation and code.The documentation uses
service_catalogs(snake_case) for the context name and schema, but the codebase usesServiceCatalogs(PascalCase) consistently across:
ServiceCatalogsDbContext(DbContext class)IServiceCatalogsModuleApi(Module API interface)MeAjudaAi.Modules.ServiceCatalogs(namespace)Consider updating the documentation to use
ServiceCatalogs(PascalCase) for the context title at line 118 to match the code, or clarify thatservice_catalogsrefers specifically to the PostgreSQL schema name (which correctly uses snake_case per theUseSnakeCaseNamingConvention()in DbContext configuration).For clarity, you could structure it as:
#### 3. **ServiceCatalogs Context** (Implementado) **Responsabilidade**: Catálogo administrativo de categorias e serviços **Schema**: `service_catalogs` (isolado no PostgreSQL)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsIntegrationTests.cs (1)
9-13: Incomplete rename: Class and comment still reference "Catalogs".While the namespace was updated to
ServiceCatalogs(line 7), the class name remainsCatalogsIntegrationTestsand the XML comment still refers to "módulo Catalogs". These should be updated for consistency.Apply this diff to complete the rename:
/// <summary> -/// Testes de integração completos para o módulo Catalogs. +/// Testes de integração completos para o módulo ServiceCatalogs. /// Valida fluxos end-to-end de criação, atualização, consulta e remoção. /// </summary> -public class CatalogsIntegrationTests(ITestOutputHelper testOutput) : ApiTestBase +public class ServiceCatalogsIntegrationTests(ITestOutputHelper testOutput) : ApiTestBasesrc/Modules/ServiceCatalogs/Infrastructure/Extensions.cs (1)
59-63: Schema name mismatch in migrations configuration.Line 62 specifies
"ServiceCatalogs"(PascalCase) as the migrations history table schema, which conflicts with:
- The snake_case convention enabled on line 65 (
UseSnakeCaseNamingConvention())- Documentation suggesting schema name is
"service_catalogs"(snake_case)- Line 98 in ApiTestBase.cs which uses
"catalogs"(lowercase, no underscore)For consistency with the snake_case naming convention and to avoid schema name mismatches, consider:
-npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", "ServiceCatalogs"); +npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", "service_catalogs");This ensures the migrations history table resides in the correct schema that matches the snake_case convention applied to all other database objects.
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
93-104: Update schema name in migrations history table configuration.Line 98 uses the incorrect schema name
"catalogs". The ServiceCatalogs module consistently uses"ServiceCatalogs"(PascalCase) as the default schema across all configurations (Extensions.cs:62, ServiceCatalogsDbContext.cs:17, ServiceCatalogsDbContextFactory.cs:50, and migrations). Update line 98 to match:-npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", "catalogs"); +npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", "ServiceCatalogs");tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs (1)
78-89: Fix schema name to match ServiceCatalogsDbContext configuration.The test expects schema "catalogs" but ServiceCatalogsDbContext is configured with "ServiceCatalogs" (PascalCase). Three locations need correction:
- ServiceCatalogsDbContextTests.cs line 88: Change
"catalogs"to"ServiceCatalogs"- ApiTestBase.cs line 98: Change MigrationsHistoryTable schema from
"catalogs"to"ServiceCatalogs"- ApiTestBase.cs line 173: Update comment from "schema catalogs" to "schema ServiceCatalogs"
🧹 Nitpick comments (20)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (1)
10-18: Align class name and comments with ServiceCatalogs module namingNamespace has been updated to
ServiceCatalogs, but:
- XML summary (Lines 13–16) still talks about “Catalogs module”.
- Class name is still
CatalogsDependencyInjectionTestwhile the file and namespace areServiceCatalogs.Recommend renaming the class and comments to avoid confusion and keep naming consistent. For example:
-/// 🧪 TESTE DIAGNÓSTICO PARA CATALOGS MODULE DEPENDENCY INJECTION +/// 🧪 TESTE DIAGNÓSTICO PARA SERVICE CATALOGS MODULE DEPENDENCY INJECTION -/// Verifica se todos os command handlers do módulo Catalogs estão registrados +/// Verifica se todos os command handlers do módulo ServiceCatalogs estão registrados -public class CatalogsDependencyInjectionTest(ITestOutputHelper testOutput) : ApiTestBase +public class ServiceCatalogsDependencyInjectionTest(ITestOutputHelper testOutput) : ApiTestBaseYou may also want to similarly adjust the “Catalogs assembly” wording further down in the test to “ServiceCatalogs assembly” for full consistency.
tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs (1)
237-265: Consider using imported DTOs instead of local definitions.These local DTO definitions likely duplicate the DTOs available in
MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs(imported on line 4). Maintaining duplicate definitions violates the DRY principle and creates a maintenance burden.If the imported DTOs match these definitions, remove the local DTOs and use the imported types instead. If the local DTOs are intentionally different (e.g., for testing specific scenarios), add a comment explaining why they differ from the module's DTOs.
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ChangeServiceCategoryCommandHandlerTests.cs (1)
175-205: Solid input validation tests with proper early-exit verification!The empty ID validation tests correctly verify that the handler performs early validation before accessing repositories, as evidenced by the
Times.Neverassertions onGetByIdAsync. This demonstrates good separation of concerns and prevents unnecessary repository operations.Consider adding tests for additional edge cases:
- Attempting to change a service to its current category (should this succeed as a no-op or fail?)
- Changing the category of an inactive service (is this allowed?)
Also, while using
It.IsAny<>for ID parameters in mocks is common and acceptable, you could optionally tighten these to verify exact parameter values are passed to repositories, which would catch parameter-passing bugs:_serviceRepositoryMock .Setup(x => x.GetByIdAsync(It.Is<ServiceId>(id => id.Value == service.Id.Value), It.IsAny<CancellationToken>())) .ReturnsAsync(service);These are optional enhancements to an already solid test suite.
tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs (1)
3-15: ServiceCatalogs imports and namespace look correct; consider aligning class nameThe updated
usingdirectives and namespace correctly target theServiceCatalogsmodule and match the types used throughout the tests, so the rename here looks good.Optionally, for consistency with the file path and namespace, you might also rename
CatalogsEndToEndTests(and the XML summary text) to something likeServiceCatalogsEndToEndTests, but this is cosmetic and not required for correctness.src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceTests.cs (1)
1-195: Service entity tests look solid; optional tweak for maintainabilityThe test suite exercises the main behaviors of
Service(creation validation, updates, category changes, activation state) and mirrors the existing patterns from the previous Catalogs module. Assertions on exceptions and state changes look correct.If you want to reduce brittleness against future max‑length changes, consider replacing the hard‑coded
151inCreate_WithTooLongName_ShouldThrowCatalogDomainException(and any related literals) withValidationConstants.CatalogLimits.ServiceNameMaxLength + 1, similar to howServiceCategoryTestsuse the shared constants.src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (1)
7-80: Builder implementation is correct; consider reusing validation constants
ServiceBuildercorrectly creates validServiceinstances, with sensible defaults and the ability to override key fields. Truncating Faker‑generated values prevents accidental violations of name/description limits and the active/inactive toggle is handled cleanly.To keep this builder in sync with domain constraints as they evolve, you might optionally replace the hard‑coded
150and1000limits withValidationConstants.CatalogLimits.ServiceNameMaxLengthandServiceDescriptionMaxLength.tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsApiTests.cs (1)
7-13: Namespace update is correct; optional class/doc rename for consistencyUpdating the namespace to
MeAjudaAi.Integration.Tests.Modules.ServiceCatalogsmatches the new module naming and folder structure.For consistency, you might also (optionally) rename the class and XML summary to refer to ServiceCatalogs instead of Catalogs (e.g.,
ServiceCatalogsApiTests), but this is cosmetic and not required for correctness.docs/testing/test_infrastructure.md (1)
266-266: Consider using PascalCase for consistency with other modules.Line 266 uses "Testes de service_catalogs" while other modules in the list use PascalCase (e.g., "Testes de Users"). For consistency, consider:
-- Testes de service_catalogs +- Testes de ServiceCatalogssrc/Modules/ServiceCatalogs/Application/Extensions.cs (1)
11-12: Comment may be outdated: handlers are explicitly registered, not via reflection.The comment states handlers are "automatically registered through reflection in Infrastructure layer via AddApplicationHandlers()", but reviewing
Infrastructure/Extensions.cs(lines 74-94) shows explicit registrations for each handler:services.AddScoped<ICommandHandler<CreateServiceCategoryCommand, Result<ServiceCategoryDto>>, CreateServiceCategoryCommandHandler>(); // ... more explicit registrationsConsider updating the comment to reflect the actual implementation:
-// Note: Handlers are automatically registered through reflection in Infrastructure layer -// via AddApplicationHandlers() which scans the Application assembly +// Note: Handlers are explicitly registered in Infrastructure layer +// via AddServiceCatalogsInfrastructure() extension methodsrc/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceByIdQueryHandlerTests.cs (1)
24-73: Solid handler coverage; consider verifying repository argument more strictlyBoth tests cover the happy-path and not-found scenarios well, including repository invocation count and DTO mapping. If you want to harden them a bit further, you could also assert that
GetByIdAsyncis called with the specificServiceIdfromqueryinstead ofIt.IsAny<ServiceId>(), but that’s purely optional polish.src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoryByIdQueryHandlerTests.cs (1)
23-69: Consistent and clear GetById tests; optional stricter argument checksThe tests nicely mirror the service GetById coverage and assert both mapping and repository interaction count. As an optional enhancement, you could verify that
GetByIdAsyncreceives theServiceCategoryIdderived fromqueryinstead ofIt.IsAny<ServiceCategoryId>()to make the behavior a bit more explicit.src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCategoryCommandHandlerTests.cs (1)
24-98: Good coverage of update paths; consider asserting name-uniqueness checksThe three tests give solid coverage of the main paths (success, not found, duplicate name) and correctly verify when
UpdateAsyncis (and isn’t) called. To guard against future regressions around name uniqueness, you could additionallyVerifythatExistsWithNameAsyncis invoked in both the success and duplicate-name tests (and not called in the not-found case). That would make the contract around duplicate checking explicit in the tests.src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServicesByCategoryQueryHandlerTests.cs (1)
23-95: Comprehensive query tests; optional extra assertions for mappingThese tests nicely cover:
- Category with services
- Active-only filtering
- Empty result set
They already verify the
activeOnlyflag via the mock setup/verify and assertCategoryId/IsActive, which is great. If you want even stronger protection against mapping changes, you could also assert fields likeNameorIdon the returned DTOs, but that’s optional.src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoriesWithCountQueryHandlerTests.cs (1)
73-74: Consider adding a using directive for cleaner type references.The fully qualified type name
MeAjudaAi.Modules.ServiceCatalogs.Domain.ValueObjects.ServiceCategoryIdis verbose and reduces readability.Add a using directive at the top of the file:
+using MeAjudaAi.Modules.ServiceCatalogs.Domain.ValueObjects;Then simplify the Verify calls:
- _serviceRepositoryMock.Verify(x => x.CountByCategoryAsync(It.IsAny<MeAjudaAi.Modules.ServiceCatalogs.Domain.ValueObjects.ServiceCategoryId>(), false, It.IsAny<CancellationToken>()), Times.Exactly(2)); - _serviceRepositoryMock.Verify(x => x.CountByCategoryAsync(It.IsAny<MeAjudaAi.Modules.ServiceCatalogs.Domain.ValueObjects.ServiceCategoryId>(), true, It.IsAny<CancellationToken>()), Times.Exactly(2)); + _serviceRepositoryMock.Verify(x => x.CountByCategoryAsync(It.IsAny<ServiceCategoryId>(), false, It.IsAny<CancellationToken>()), Times.Exactly(2)); + _serviceRepositoryMock.Verify(x => x.CountByCategoryAsync(It.IsAny<ServiceCategoryId>(), true, It.IsAny<CancellationToken>()), Times.Exactly(2));This same pattern appears at lines 95, 99, and 131.
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (1)
5-5: Remove unused import.The
Microsoft.Extensions.Loggingnamespace is imported but not used in this test class.-using Microsoft.Extensions.Logging;src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCategoryCommandHandlerTests.cs (1)
26-95: Consider adding edge case tests for consistency.The test coverage is good, but consider adding these scenarios for completeness and consistency with similar handler tests (e.g., DeleteServiceCommandHandlerTests):
- Empty GUID validation: Test behavior when
Guid.Emptyis provided as the category ID- Inactive category deletion: Clarify whether inactive categories can be deleted (business rule validation)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (1)
18-39: Consider database name length limits.The database name construction at line 24 uses
GetType().Name.ToUpperInvariant(), which could result in very long database names if test classes have lengthy names. PostgreSQL has a 63-character limit for identifiers.Consider truncating or hashing long test class names:
Database = new TestDatabaseOptions { - DatabaseName = $"test_db_{GetType().Name.ToUpperInvariant()}", + DatabaseName = $"test_db_{GetType().Name.ToUpperInvariant()[..Math.Min(50, GetType().Name.Length)]}", Username = "test_user", Password = "test_password", Schema = "ServiceCatalogs" },src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
12-16: Consider callingbase.OnModuleInitializeAsyncfor future‑proofingHere you override
OnModuleInitializeAsyncwithout callingbase, unlike other integration tests. While the current base implementation is a no‑op, this could break silently if initialization logic is added later. Suggest:- protected override Task OnModuleInitializeAsync(IServiceProvider serviceProvider) - { - _repository = GetService<IServiceRepository>(); - return Task.CompletedTask; - } + protected override async Task OnModuleInitializeAsync(IServiceProvider serviceProvider) + { + await base.OnModuleInitializeAsync(serviceProvider); + _repository = GetService<IServiceRepository>(); + }
38-42: Optional: prefer factory method forServiceIdfor consistencyEverywhere else you seem to use value‑object factories (
ServiceCategoryId.From). For consistency and centralized validation, you might want to use an equivalent factory forServiceIdinstead ofnew Domain.ValueObjects.ServiceId(nonExistentId), if available.docs/roadmap.md (1)
225-225: Minor: Refine Portuguese phrasing for conciseness.The phrase "através de um catálogo admin-managed" could be more concise. Consider "por um catálogo admin-managed" or "por catálogo admin-managed gerenciado" for clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (58)
MeAjudaAi.sln(4 hunks)docs/architecture.md(2 hunks)docs/modules/service_catalogs.md(12 hunks)docs/roadmap.md(9 hunks)docs/testing/test_infrastructure.md(2 hunks)infrastructure/test-database-init.ps1(2 hunks)infrastructure/test-database-init.sh(2 hunks)src/Modules/ServiceCatalogs/API/Endpoints/Service/ValidateServicesEndpoint.cs(2 hunks)src/Modules/ServiceCatalogs/Application/Extensions.cs(2 hunks)src/Modules/ServiceCatalogs/Application/ModuleApi/ServiceCatalogsModuleApi.cs(6 hunks)src/Modules/ServiceCatalogs/Application/ModuleApi/TemporaryModuleDtos.cs(0 hunks)src/Modules/ServiceCatalogs/Domain/Exceptions/CatalogDomainException.cs(1 hunks)src/Modules/ServiceCatalogs/Infrastructure/Extensions.cs(2 hunks)src/Modules/ServiceCatalogs/Infrastructure/MeAjudaAi.Modules.ServiceCatalogs.Infrastructure.csproj(1 hunks)src/Modules/ServiceCatalogs/Infrastructure/Persistence/Repositories/ServiceRepository.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/GlobalTestConfiguration.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Integration/ServiceCatalogsModuleApiIntegrationTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Integration/ServiceCategoryRepositoryIntegrationTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/MeAjudaAi.Modules.ServiceCatalogs.Tests.csproj(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ChangeServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServiceCategoriesQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServicesQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceByIdQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoriesWithCountQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoryByIdQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServicesByCategoryQueryHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Domain/ValueObjects/ServiceCategoryIdTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Domain/ValueObjects/ServiceIdTests.cs(1 hunks)src/Shared/Contracts/Modules/ServiceCatalogs/DTOs/ServiceCatalogsModuleDtos.cs(1 hunks)src/Shared/Contracts/Modules/ServiceCatalogs/IServiceCatalogsModuleApi.cs(1 hunks)tests/MeAjudaAi.Architecture.Tests/ModuleApiArchitectureTests.cs(2 hunks)tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs(1 hunks)tests/MeAjudaAi.E2E.Tests/MeAjudaAi.E2E.Tests.csproj(1 hunks)tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs(9 hunks)tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs(6 hunks)tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj(1 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsApiTests.cs(1 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs(5 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs(3 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsIntegrationTests.cs(1 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsResponseDebugTest.cs(1 hunks)
💤 Files with no reviewable changes (1)
- src/Modules/ServiceCatalogs/Application/ModuleApi/TemporaryModuleDtos.cs
🧰 Additional context used
🧬 Code graph analysis (32)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceTests.cs (2)
src/Modules/Catalogs/Tests/Unit/Domain/Entities/ServiceTests.cs (1)
ServiceTests(8-195)src/Modules/Catalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs (1)
ServiceCategoryTests(8-252)
src/Modules/ServiceCatalogs/Tests/GlobalTestConfiguration.cs (1)
tests/MeAjudaAi.Shared.Tests/GlobalTestConfiguration.cs (1)
SharedIntegrationTestFixture(30-44)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoriesWithCountQueryHandlerTests.cs (3)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCategoryCommandHandlerTests.cs (1)
Trait(10-96)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServiceCategoriesQueryHandlerTests.cs (1)
Trait(8-96)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/ValueObjects/ServiceIdTests.cs (1)
src/Modules/Catalogs/Tests/Unit/Domain/ValueObjects/ServiceIdTests.cs (1)
ServiceIdTests(5-86)
src/Modules/ServiceCatalogs/Infrastructure/Extensions.cs (1)
src/Modules/ServiceCatalogs/Application/Mappings/DtoMappingExtensions.cs (3)
ServiceCategoryDto(46-54)ServiceDto(27-41)ServiceListDto(16-22)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCategoryCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCategoryCommandHandlerTests.cs (1)
Trait(10-114)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCommandHandlerTests.cs (1)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (1)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (1)
TestInfrastructureOptions(18-39)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServicesByCategoryQueryHandlerTests.cs (1)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoryByIdQueryHandlerTests.cs (1)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCategoryCommandHandlerTests.cs (1)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs (1)
Theory(35-45)src/Modules/Catalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (1)
Trait(9-90)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (1)
src/Modules/Catalogs/Tests/Builders/ServiceBuilder.cs (1)
ServiceBuilder(7-81)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs (2)
src/Shared/Constants/ValidationConstants.cs (2)
ValidationConstants(9-79)CatalogLimits(69-78)src/Modules/Catalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs (1)
ServiceCategoryTests(8-252)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/ValueObjects/ServiceCategoryIdTests.cs (1)
src/Modules/Catalogs/Tests/Unit/Domain/ValueObjects/ServiceCategoryIdTests.cs (1)
ServiceCategoryIdTests(5-86)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ChangeServiceCategoryCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (1)
src/Modules/Catalogs/Tests/Builders/ServiceCategoryBuilder.cs (1)
ServiceCategoryBuilder(7-66)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCommandHandlerTests.cs (3)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCommandHandlerTests.cs (1)
Trait(10-118)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCategoryCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/Catalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCategoryCommandHandlerTests.cs (6)
Trait(10-99)UpdateServiceCategoryCommandHandlerTests(18-22)x(42-42)x(88-88)x(97-97)Fact(24-52)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServiceCategoriesQueryHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServicesQueryHandlerTests.cs (1)
Trait(8-95)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
tests/MeAjudaAi.Shared.Tests/Infrastructure/TestInfrastructureOptions.cs (2)
TestCacheOptions(62-73)TestExternalServicesOptions(75-86)src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (1)
IServiceCollection(19-70)src/Modules/ServiceCatalogs/Tests/Integration/ServiceCatalogsModuleApiIntegrationTests.cs (1)
Task(12-16)src/Modules/ServiceCatalogs/Tests/Integration/ServiceCategoryRepositoryIntegrationTests.cs (1)
Task(14-18)src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (1)
Task(12-16)
src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
ServiceCatalogsIntegrationTestBase(13-109)Task(52-57)Task(62-75)Task(80-94)Task(99-108)src/Shared/Time/UuidGenerator.cs (1)
UuidGenerator(8-33)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCategoryCommandHandlerTests.cs (3)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCommandHandlerTests.cs (1)
Trait(10-118)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCategoryCommandHandlerTests.cs (1)
Trait(10-114)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)
src/Modules/ServiceCatalogs/Tests/Integration/ServiceCategoryRepositoryIntegrationTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
ServiceCatalogsIntegrationTestBase(13-109)Task(52-57)Task(62-75)Task(80-94)Task(99-108)src/Shared/Time/UuidGenerator.cs (1)
UuidGenerator(8-33)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeleteServiceCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCommandHandlerTests.cs (4)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/ActivateServiceCategoryCommandHandlerTests.cs (1)
Trait(10-114)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/DeactivateServiceCommandHandlerTests.cs (1)
Trait(10-118)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceByIdQueryHandlerTests.cs (1)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Tests/Integration/ServiceCatalogsModuleApiIntegrationTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
ServiceCatalogsIntegrationTestBase(13-109)Task(52-57)Task(62-75)Task(80-94)Task(99-108)src/Shared/Time/UuidGenerator.cs (1)
UuidGenerator(8-33)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetAllServicesQueryHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)src/Modules/Catalogs/Tests/Unit/Application/Handlers/Queries/GetAllServicesQueryHandlerTests.cs (2)
Trait(8-95)GetAllServicesQueryHandlerTests(16-20)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs (3)
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (4)
ApiTestBase(25-259)Task(150-180)Task(207-228)Task(233-249)tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs (6)
Fact(14-42)Fact(44-70)Fact(72-98)Fact(100-118)Task(184-206)Task(208-231)tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs (4)
Task(309-328)Task(330-349)Task(351-371)Task(373-393)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/UpdateServiceCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (7)
ServiceCategoryBuilder(7-66)ServiceCategoryBuilder(14-33)ServiceCategoryBuilder(35-39)ServiceCategoryBuilder(41-45)ServiceCategoryBuilder(47-51)ServiceCategoryBuilder(53-58)ServiceCategoryBuilder(60-65)src/Modules/ServiceCatalogs/Tests/Builders/ServiceBuilder.cs (9)
ServiceBuilder(7-81)ServiceBuilder(15-38)ServiceBuilder(40-44)ServiceBuilder(46-50)ServiceBuilder(52-56)ServiceBuilder(58-62)ServiceBuilder(64-68)ServiceBuilder(70-74)ServiceBuilder(76-80)
src/Modules/ServiceCatalogs/Application/ModuleApi/ServiceCatalogsModuleApi.cs (1)
tests/MeAjudaAi.Shared.Tests/Infrastructure/TestLoggingConfiguration.cs (1)
ILogger(82-82)
🪛 LanguageTool
docs/roadmap.md
[style] ~225-~225: Para conferir mais clareza ao seu texto, busque usar uma linguagem mais concisa.
Context: ...serviços que prestadores podem oferecer através de um catálogo admin-managed. #### **Arqu...
(ATRAVES_DE_POR_VIA)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code Quality Checks
- GitHub Check: Security Scan
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs
Outdated
Show resolved
Hide resolved
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs
Show resolved
Hide resolved
src/Shared/Contracts/Modules/ServiceCatalogs/IServiceCatalogsModuleApi.cs
Show resolved
Hide resolved
tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs
Outdated
Show resolved
Hide resolved
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsResponseDebugTest.cs
Outdated
Show resolved
Hide resolved
- Fix interface name in roadmap.md (Iservice_catalogsModuleApi → IServiceCatalogsModuleApi) - Update test filenames in test_infrastructure.md to PascalCase - Fix database schema name in test-database-init scripts (service_service_catalogs → catalogs) - Implement nullable int? pattern for _displayOrder in ServiceCategoryBuilder - Add defensive null initialization for nested options in TestInfrastructureExtensions - Update XML comment in IServiceCatalogsModuleApi (Catalogs → ServiceCatalogs module) - Remove unused using directive in ServiceCatalogsModuleIntegrationTests - Rename class CatalogsResponseDebugTest → ServiceCatalogsResponseDebugTest
- Update class names: CatalogsModuleIntegrationTests → ServiceCatalogsModuleIntegrationTests, CatalogsIntegrationTests → ServiceCatalogsIntegrationTests - Fix database role names in test scripts: service_catalogs_role/owner → catalogs_role/owner - Standardize schema name to 'service_catalogs' across all configurations (Extensions.cs, ApiTestBase.cs, ServiceCatalogsDbContextTests.cs) - Update architecture.md context title to PascalCase 'ServiceCatalogs Context' - Fix migration comments to reference correct schema names
…nsistency - Rename test classes: CatalogsDependencyInjectionTest → ServiceCatalogsDependencyInjectionTest, CatalogsEndToEndTests → ServiceCatalogsEndToEndTests, CatalogsApiTests → ServiceCatalogsApiTests - Update all XML comments referencing 'Catalogs module' to 'ServiceCatalogs module' - Add explanatory comment for intentional local DTO definitions in E2E tests - Fix test_infrastructure.md to use PascalCase 'ServiceCatalogs' instead of snake_case - Update Application Extensions.cs comment to reflect explicit handler registration pattern
- Add using directive for ServiceCategoryId to simplify type references in GetServiceCategoriesWithCountQueryHandlerTests - Remove unused Microsoft.Extensions.Logging import from CreateServiceCategoryCommandHandlerTests - Add database name length limit (50 chars) in ServiceCatalogsIntegrationTestBase to respect PostgreSQL identifier limits - Call base.OnModuleInitializeAsync in ServiceRepositoryIntegrationTests for future-proofing - Refine Portuguese phrasing in roadmap.md for better clarity and conciseness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (1)
66-100: Update stale "Catalogs" references to "ServiceCatalogs".The method contains stale references to "Catalogs" in comments and output messages that should be updated to "ServiceCatalogs" for consistency with the module rename.
Apply this diff to update the stale references:
- // Arrange - Scan Catalogs assembly for command handler types + // Arrange - Scan ServiceCatalogs assembly for command handler types var catalogsAssembly = typeof(CreateServiceCategoryCommand).Assembly; var commandHandlerType = typeof(ICommandHandler<,>); // Act - Find all types that implement ICommandHandler<,> var handlerTypes = catalogsAssembly.GetTypes() .Where(t => t.IsClass && !t.IsAbstract) .Where(t => t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == commandHandlerType)) .ToList(); - testOutput.WriteLine($"Found {handlerTypes.Count} command handler types in Catalogs assembly:"); + testOutput.WriteLine($"Found {handlerTypes.Count} command handler types in ServiceCatalogs assembly:"); // Assert - Verify each handler can be resolved from DI - handlerTypes.Should().NotBeEmpty("Catalogs assembly should contain command handlers"); + handlerTypes.Should().NotBeEmpty("ServiceCatalogs assembly should contain command handlers");tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
179-179: Update module name to match the renamed context.The module name parameter is still
"Catalogs"but should be"ServiceCatalogs"for consistency with the context type and the broader rename effort.Apply this diff:
- await VerifyContextAsync(catalogsContext, "Catalogs", () => catalogsContext.ServiceCategories.CountAsync(), logger); + await VerifyContextAsync(catalogsContext, "ServiceCatalogs", () => catalogsContext.ServiceCategories.CountAsync(), logger);
♻️ Duplicate comments (1)
docs/roadmap.md (1)
308-308: Fix interface name to match C# conventions (duplicate from previous review).The interface name is documented as
Iservice_catalogsModuleApi, but line 313 shows the correct C# PascalCase nameIServiceCatalogsModuleApi. Update this reference to match.Apply this diff:
-- `Iservice_catalogsModuleApi` - Interface pública +- `IServiceCatalogsModuleApi` - Interface pública
🧹 Nitpick comments (4)
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (3)
23-34: Defensive initialization of nested options looks goodInitializing
Database,Cache, andExternalServicesplus defaultingSchemaprevents null dereferences and gives predictable defaults. If you ever want the module’s default schema to beServiceCatalogsrather than"public"when no options are passed, this is the single place to flip that behavior.
54-59: Consider using a type-safe reference for the migrations assemblyHardcoding
"MeAjudaAi.Modules.ServiceCatalogs.Infrastructure"couples this config to the assembly name string. You could instead derive it from a type in that assembly to avoid breakage on renames, e.g.:- dbOptions.UseNpgsql(connectionString, npgsqlOptions => - { - npgsqlOptions.MigrationsAssembly("MeAjudaAi.Modules.ServiceCatalogs.Infrastructure"); + dbOptions.UseNpgsql(connectionString, npgsqlOptions => + { + npgsqlOptions.MigrationsAssembly(typeof(ServiceCatalogsDbContext).Assembly.FullName); npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", options.Database.Schema); npgsqlOptions.CommandTimeout(60); })
84-90: Optional: MakeTestDateTimeProvidercontrollable for time-sensitive testsReturning
DateTime.UtcNowis fine for most cases, but if you start writing time-dependent tests it may be useful to expose a settable “current time” (e.g., a property or method to freeze/advance time) so tests are deterministic.src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (1)
66-83: Strengthen the “active only” repository test (optional)The test correctly verifies that the explicitly deactivated service is excluded when
activeOnly: true. If the entity exposes anIsActive(or equivalent) flag, you could additionally assert that all returned services are active to better catch mistakes in the filter logic:result.Should().OnlyContain(s => s.IsActive);(adjusting the predicate to the actual property name if available).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
docs/architecture.md(2 hunks)docs/roadmap.md(9 hunks)docs/testing/test_infrastructure.md(2 hunks)src/Modules/ServiceCatalogs/Application/Extensions.cs(2 hunks)src/Modules/ServiceCatalogs/Infrastructure/Extensions.cs(2 hunks)src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoriesWithCountQueryHandlerTests.cs(1 hunks)src/Shared/Contracts/Modules/ServiceCatalogs/IServiceCatalogsModuleApi.cs(1 hunks)tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs(2 hunks)tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs(9 hunks)tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs(6 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsApiTests.cs(1 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs(4 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs(3 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsIntegrationTests.cs(1 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsResponseDebugTest.cs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
- docs/testing/test_infrastructure.md
- src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Queries/GetServiceCategoriesWithCountQueryHandlerTests.cs
- docs/architecture.md
- tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs
- src/Modules/ServiceCatalogs/Application/Extensions.cs
- tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsIntegrationTests.cs
- src/Shared/Contracts/Modules/ServiceCatalogs/IServiceCatalogsModuleApi.cs
🧰 Additional context used
🧬 Code graph analysis (10)
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (4)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (1)
TestInfrastructureOptions(18-39)tests/MeAjudaAi.Shared.Tests/Infrastructure/TestInfrastructureOptions.cs (2)
TestCacheOptions(62-73)TestExternalServicesOptions(75-86)src/Shared/Database/DapperConnection.cs (1)
GetConnectionString(11-22)src/Modules/Catalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (1)
IServiceCollection(19-70)
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (1)
src/Modules/Catalogs/Tests/Builders/ServiceCategoryBuilder.cs (1)
ServiceCategoryBuilder(7-66)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (2)
tests/MeAjudaAi.Shared.Tests/Infrastructure/TestInfrastructureOptions.cs (2)
TestCacheOptions(62-73)TestExternalServicesOptions(75-86)src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (1)
IServiceCollection(19-81)
src/Modules/ServiceCatalogs/Infrastructure/Extensions.cs (3)
src/Modules/ServiceCatalogs/Infrastructure/Persistence/Repositories/ServiceCategoryRepository.cs (1)
ServiceCategoryRepository(8-73)src/Modules/ServiceCatalogs/Infrastructure/Persistence/Repositories/ServiceRepository.cs (1)
ServiceRepository(8-128)src/Modules/ServiceCatalogs/Application/Mappings/DtoMappingExtensions.cs (3)
ServiceCategoryDto(46-54)ServiceDto(27-41)ServiceListDto(16-22)
tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs (1)
tests/MeAjudaAi.E2E.Tests/Base/TestContainerTestBase.cs (1)
TestContainerTestBase(24-355)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs (2)
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (5)
ApiTestBase(25-259)Task(150-180)Task(207-228)Task(233-249)Task(254-258)tests/MeAjudaAi.E2E.Tests/Modules/ServiceCatalogs/ServiceCatalogsEndToEndTests.cs (6)
Fact(16-38)Fact(40-60)Task(309-328)Task(330-349)Task(351-371)Task(373-393)
src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
ServiceCatalogsIntegrationTestBase(13-109)Task(52-57)Task(62-75)Task(80-94)Task(99-108)src/Shared/Time/UuidGenerator.cs (1)
UuidGenerator(8-33)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsApiTests.cs (1)
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
ApiTestBase(25-259)
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Unit/Domain/Entities/ServiceCategoryTests.cs (1)
Theory(35-45)src/Modules/Catalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (1)
Trait(9-90)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (2)
src/Modules/ServiceCatalogs/Application/Extensions.cs (1)
Extensions(7-20)tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
ApiTestBase(25-259)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code Quality Checks
- GitHub Check: Security Scan
🔇 Additional comments (28)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (5)
1-10: LGTM! Imports and namespace correctly updated.All using statements and the namespace declaration have been properly updated from
CatalogstoServiceCatalogs, maintaining consistency with the module rename.
12-17: LGTM! Class renamed and documentation updated.The test class name and associated documentation have been correctly updated to reflect the
ServiceCatalogsmodule rename.
43-53: LGTM! Repository type reference updated.The repository type reference has been correctly updated to use the new
ServiceCatalogsnamespace path.
55-64: LGTM! DbContext references updated consistently.The test method name, type references, and assertion messages have all been correctly updated from
CatalogsDbContexttoServiceCatalogsDbContext.
102-147: LGTM! Command execution test is comprehensive.The test properly validates the full command execution path including command dispatcher resolution, handler execution, error handling, and result validation.
src/Modules/ServiceCatalogs/Tests/Builders/ServiceCategoryBuilder.cs (2)
12-12: LGTM! Previous issue resolved correctly.The nullable
int?pattern for_displayOrdercorrectly addresses the concern raised in the previous review. Now the builder can distinguish between "not set" (null) and "explicitly set to 0", allowing the random fallback to work as intended.Also applies to: 22-22, 47-50
7-66: Well-structured test builder.The builder correctly implements the test builder pattern with:
- Appropriate default values and nullable fields for optional parameters
- Clean fluent API for test data customization
- Proper handling of entity state (active/inactive) via domain methods
src/Modules/ServiceCatalogs/Tests/Unit/Application/Handlers/Commands/CreateServiceCategoryCommandHandlerTests.cs (4)
8-20: LGTM! Clean test setup.The test class is properly structured with appropriate traits for the renamed "ServiceCatalogs" module and follows standard unit testing practices with mocked dependencies.
22-47: LGTM! Comprehensive happy path test.The test properly verifies the success scenario with appropriate assertions and mock verifications. The test confirms both the result state and the expected repository interactions.
49-70: LGTM! Proper duplicate validation test.The test correctly verifies that duplicate names are rejected and ensures the repository's
AddAsyncmethod is never called when validation fails.
72-88: LGTM! Invalid input test coverage.The parameterized test properly covers edge cases for invalid names (null, empty, whitespace). The null-forgiving operator on line 79 is acceptable here since the test intentionally passes invalid values to verify the handler's validation logic.
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
3-3: LGTM! DbContext and schema rename correctly applied.The using directive, DI registrations, migrations assembly, and schema name have all been consistently updated from
Catalogs/catalogstoServiceCatalogs/service_catalogs.Also applies to: 54-54, 93-104, 143-143
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsResponseDebugTest.cs (1)
8-10: LGTM! Previous review feedback addressed.The namespace and class name have been correctly updated to
ServiceCatalogsandServiceCatalogsResponseDebugTestrespectively, addressing the previous review comment.docs/roadmap.md (1)
221-221: LGTM! Documentation consistently updated.Module name, schema references, and SQL examples have been consistently updated from
Catalogs/catalogstoServiceCatalogs/service_catalogsthroughout the roadmap.Also applies to: 229-229, 278-281, 353-377
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsApiTests.cs (1)
7-13: LGTM! Test class consistently renamed.The namespace, class name, and documentation have been consistently updated to reflect the
ServiceCatalogsnaming.tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDbContextTests.cs (1)
3-3: LGTM! DbContext tests consistently updated.The namespace, class name, method names, type references, and schema name have all been consistently updated from
Catalogs/catalogstoServiceCatalogs/service_catalogsthroughout the test suite.Also applies to: 6-6, 12-12, 15-96
src/Modules/ServiceCatalogs/Infrastructure/Extensions.cs (4)
1-16: LGTM! Using directives properly organized.The using directives correctly reference the renamed ServiceCatalogs namespaces and include the necessary shared infrastructure for command/query handler registrations.
87-93: All query handler implementations confirmed to exist.Verification successful. All six query handlers registered at lines 87-93 exist with matching signatures:
- GetAllServiceCategoriesQueryHandler ✓
- GetServiceCategoryByIdQueryHandler ✓
- GetServiceCategoriesWithCountQueryHandler ✓
- GetAllServicesQueryHandler ✓
- GetServiceByIdQueryHandler ✓
- GetServicesByCategoryQueryHandler ✓
Handlers are properly implemented as sealed classes with dependency injection in both ServiceCategory and Service folders.
74-86: All command handler implementations verified and present.Verification confirms all 11 command handlers referenced in the DI registrations (lines 74-86) exist in the codebase:
- CreateServiceCategoryCommandHandler ✓
- CreateServiceCommandHandler ✓
- UpdateServiceCategoryCommandHandler ✓
- UpdateServiceCommandHandler ✓
- DeleteServiceCategoryCommandHandler ✓
- DeleteServiceCommandHandler ✓
- ActivateServiceCategoryCommandHandler ✓
- ActivateServiceCommandHandler ✓
- DeactivateServiceCategoryCommandHandler ✓
- DeactivateServiceCommandHandler ✓
- ChangeServiceCategoryCommandHandler ✓
All handlers are implemented as sealed classes with constructor injection, matching the expected signatures.
59-68: Schema naming consistency change does not constitute a breaking change for new deployments.The codebase evidence shows this is an initial migration (20251117205349_InitialCreate) creating the "ServiceCatalogs" module for the first time. When EF Core applies the first migration, it will create the
__EFMigrationsHistorytable in the configured schema (service_catalogs) automatically. Since no migrations have been applied yet in any deployment, this is not a breaking change.However, if this code is being deployed to an environment where migrations have already been applied, you are responsible for updating the existing table in the database. The original review's migration guidance would be necessary only in that scenario.
The change from
"ServiceCatalogs"to"service_catalogs"aligns with the snake_case naming convention being used via.UseSnakeCaseNamingConvention()elsewhere in the DbContext configuration, making this a consistency improvement rather than a risky schema change.No action required unless this is being merged into a system with pre-existing ServiceCatalogs deployments.
tests/MeAjudaAi.E2E.Tests/Integration/ServiceCatalogsModuleIntegrationTests.cs (4)
8-8: LGTM! Documentation updated correctly.The summary comment has been properly updated to reference the ServiceCatalogs module.
11-11: LGTM! Class renamed appropriately.The test class has been correctly renamed to
ServiceCatalogsModuleIntegrationTests, aligning with the module rename.
236-238: Excellent documentation of design decision.The added NOTE clearly explains why local DTOs are defined instead of importing from the Application.DTOs namespace. This is a good practice for E2E tests—validating the external API contract independently from internal DTO changes helps catch breaking API changes early.
23-217: ****The review comment incorrectly identifies an inconsistency that does not exist. The API endpoints using
/api/v1/catalogs/...paths are intentional and explicitly configured inServiceCatalogsModuleEndpoints.cs:var categoriesEndpoints = BaseEndpoint.CreateVersionedGroup(app, "catalogs/categories", "ServiceCategories"); var servicesEndpoints = BaseEndpoint.CreateVersionedGroup(app, "catalogs/services", "Services");The ServiceCatalogs module deliberately uses the
"catalogs"route prefix despite the module name. This is a valid architectural choice—module names and route prefixes are independent concerns. The tests are validating the correct API contract that is intentionally implemented. There is no endpoint mismatch to fix.Likely an incorrect or invalid review comment.
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (2)
18-38: Solid default test options for the modulePer-test-type DB naming, explicit
"ServiceCatalogs"schema, shared Redis cache, and mocked external services are all sensible defaults for these integration tests and align with the new test infrastructure extension.
62-108: Good helper abstractions for arranging test dataThe
CreateServiceCategoryAsync,CreateServiceAsync, andCreateCategoryWithServiceAsynchelpers encapsulate persistence nicely and keep the integration tests focused on behavior rather than setup. No issues spotted here.src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
12-16: Repository resolution inOnModuleInitializeAsyncis cleanResolving
IServiceRepositoryonce inOnModuleInitializeAsyncand storing it in a field keeps the tests tidy and avoids repeated service-provider lookups. This pattern looks good.
48-195: Repository integration coverage is comprehensiveThe suite exercises the main repository operations (get by id, list, list filtered, by category, existence by name, add/update/delete, and category change) with meaningful assertions. Assuming the fixture wiring is correct, this gives good confidence in the repository behavior.
src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs
Show resolved
Hide resolved
- Add using alias 'using Domain = MeAjudaAi.Modules.ServiceCatalogs.Domain;' in ServiceRepositoryIntegrationTests - Update module name from 'Catalogs' to 'ServiceCatalogs' in ApiTestBase migration and verification calls - Fix stale 'Catalogs' references to 'ServiceCatalogs' in DependencyInjectionTest comments and assertions - Correct interface name 'Iservice_catalogsModuleApi' to 'IServiceCatalogsModuleApi' in roadmap.md - Use type-safe reference typeof(ServiceCatalogsDbContext).Assembly.FullName instead of hardcoded string in TestInfrastructureExtensions - Strengthen active-only repository test with explicit IsActive assertion
CRITICAL FIX: Add ServiceCatalogs module registration to Program.cs and project references - Add using directive for MeAjudaAi.Modules.ServiceCatalogs.API - Register AddServiceCatalogsModule in service registration pipeline - Add ServiceCatalogs.API project reference to ApiService.csproj - Keep old Catalogs module temporarily for migration period This fix resolves all 22 failing integration tests: - Handlers now properly registered via DI - Endpoints return correct responses instead of 500 errors - DbContext properly initialized with correct schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj (1)
20-25: Remove the old Catalogs.API project reference.Both the old Catalogs module (line 20) and the new ServiceCatalogs module (line 25) project references are present. Maintaining both references can lead to type conflicts, duplicate route registrations, and increased build times.
Apply this diff to remove the old reference:
<ItemGroup> <ProjectReference Include="..\..\Aspire\MeAjudaAi.ServiceDefaults\MeAjudaAi.ServiceDefaults.csproj" /> - <ProjectReference Include="..\..\Modules\Catalogs\API\MeAjudaAi.Modules.Catalogs.API.csproj" /> <ProjectReference Include="..\..\Modules\Documents\API\MeAjudaAi.Modules.Documents.API.csproj" /> <ProjectReference Include="..\..\Modules\Locations\Infrastructure\MeAjudaAi.Modules.Locations.Infrastructure.csproj" /> <ProjectReference Include="..\..\Modules\Providers\API\MeAjudaAi.Modules.Providers.API.csproj" />src/Bootstrapper/MeAjudaAi.ApiService/Program.cs (1)
113-113: Add UseServiceCatalogsModule() middleware registration.The new ServiceCatalogs module is registered in the DI container (line 38), but its middleware/endpoints are not configured here. Only the old
UseCatalogsModule()is called, meaning the new ServiceCatalogs routes won't be mapped and the module won't function correctly.Apply this diff to add the missing middleware registration:
app.UseSearchProvidersModule(); app.UseLocationModule(); + app.UseServiceCatalogsModule(); app.UseCatalogsModule();Note: Similar to the DI registration, you may want to keep
UseCatalogsModule()temporarily for backward compatibility, but ensure both are called if both modules need to function during the migration period.
🧹 Nitpick comments (1)
src/Bootstrapper/MeAjudaAi.ApiService/Program.cs (1)
3-3: Remove the old Catalogs.API using directive.Both the old Catalogs module (line 3) and the new ServiceCatalogs module (line 8) using directives are present. Once the migration is complete and the old module registration is removed (line 39), the old using statement should also be removed to avoid confusion.
Apply this diff when removing the old module:
-using MeAjudaAi.Modules.Catalogs.API; using MeAjudaAi.Modules.Documents.API;Also applies to: 8-8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
docs/roadmap.md(9 hunks)src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj(1 hunks)src/Bootstrapper/MeAjudaAi.ApiService/Program.cs(2 hunks)src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs(1 hunks)src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs(1 hunks)tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs(6 hunks)tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (3)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (1)
TestInfrastructureOptions(18-39)tests/MeAjudaAi.Shared.Tests/Infrastructure/TestInfrastructureOptions.cs (2)
TestCacheOptions(62-73)TestExternalServicesOptions(75-86)src/Modules/Catalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (1)
IServiceCollection(19-70)
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (2)
src/Modules/ServiceCatalogs/Application/Extensions.cs (1)
Extensions(7-20)tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
ApiTestBase(25-259)
src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
src/Modules/ServiceCatalogs/Tests/Infrastructure/ServiceCatalogsIntegrationTestBase.cs (5)
ServiceCatalogsIntegrationTestBase(13-109)Task(52-57)Task(62-75)Task(80-94)Task(99-108)src/Shared/Time/UuidGenerator.cs (1)
UuidGenerator(8-33)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code Quality Checks
- GitHub Check: Security Scan
🔇 Additional comments (8)
src/Modules/ServiceCatalogs/Tests/Infrastructure/TestInfrastructureExtensions.cs (2)
23-34: Excellent fix for null nested options!The defensive initialization of nested options properly addresses the previous review concern. The code now safely handles null options by initializing
Database,Cache, andExternalServicesproperties, and provides a sensible default schema ("public") when not specified. This prevents null reference exceptions when callers use the parameterless overload.
56-56: Good use of dynamic assembly name resolution.Using
typeof(ServiceCatalogsDbContext).Assembly.FullNameinstead of a hardcoded string is more maintainable and eliminates the risk of typos or outdated assembly names if the project is renamed.src/Modules/ServiceCatalogs/Tests/Integration/ServiceRepositoryIntegrationTests.cs (2)
6-6: Domain alias properly resolves previous compilation issue.The addition of
using Domain = MeAjudaAi.Modules.ServiceCatalogs.Domain;fixes the compilation errors flagged in the previous review. The alias improves readability throughout the test file (lines 44, 138) while keeping namespace references concise.
10-200: Comprehensive and well-structured integration test coverage.The test class provides excellent coverage of the
IServiceRepositorycontract with 11 test methods that verify:
- Query operations with both existing and non-existent data
- Filtering capabilities (active-only, by category)
- CRUD operations (Add, Update, Delete)
- Business logic (ChangeCategory, Deactivate)
The tests consistently follow the AAA pattern, use FluentAssertions for clear assertions, and properly leverage the base class helper methods. The coverage includes both positive and negative test cases, making this a robust test suite.
tests/MeAjudaAi.Integration.Tests/Modules/ServiceCatalogs/ServiceCatalogsDependencyInjectionTest.cs (1)
1-148: LGTM! Consistent refactoring from Catalogs to ServiceCatalogs.The integration test has been correctly refactored to align with the ServiceCatalogs module naming. All namespace references, class names, type references, and test assertions have been updated consistently while preserving the original test logic and coverage.
tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs (1)
3-179: LGTM! ServiceCatalogsDbContext integration correctly implemented.All references to the database context have been consistently updated from
CatalogsDbContexttoServiceCatalogsDbContext. The changes properly maintain the distinction between C# naming conventions (PascalCase for types) and database naming conventions (snake_case for schema names). The previous review concern about line 173 has been addressed.docs/roadmap.md (1)
221-377: Documentation refactoring correctly implemented (except for lines 278 and 281).The roadmap documentation has been thoroughly updated to reflect the ServiceCatalogs module naming. The changes properly maintain the distinction between:
- C# naming conventions (PascalCase):
IServiceCatalogsModuleApi, class names, namespaces- Database naming conventions (snake_case):
service_catalogsschema and table namesThe SQL schema definitions and migration references are all correct.
src/Bootstrapper/MeAjudaAi.ApiService/Program.cs (1)
38-39: Critical: ServiceCatalogs module is registered but not activated — missing route mapping in middleware.The services from
AddServiceCatalogsModuleare registered (line 38), butUseServiceCatalogsModule()is not called inConfigureMiddlewareAsync. This leaves the migration incomplete:
- Both modules' services are initialized and DbContexts are created
- Only the old
UseCatalogsModule()maps endpoints (line 113 of Program.cs)- ServiceCatalogs routes are unavailable to clients
While the dual
AddApplication()calls don't cause direct conflicts (each registers distinct module APIs), the inconsistent state creates risk: unnecessary resource allocation and partial functionality during migration.Either complete the migration by adding
app.UseServiceCatalogsModule();toConfigureMiddlewareAsync, or removeAddServiceCatalogsModule()until ready.
…names - Fix ROADMAP.md class names to PascalCase: * service_catalogsModuleApi → ServiceCatalogsModuleApi * service_catalogsDbContext → ServiceCatalogsDbContext - Remove old Catalogs.API project reference from ApiService.csproj - Remove old Catalogs.API using directive from Program.cs - Remove AddCatalogsModule() and UseCatalogsModule() calls - Add UseServiceCatalogsModule() middleware registration - Complete migration from old Catalogs to new ServiceCatalogs module The old Catalogs module is now fully removed from the codebase. All references updated to the new ServiceCatalogs module with proper PascalCase naming conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/roadmap.md(9 hunks)src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj(1 hunks)src/Bootstrapper/MeAjudaAi.ApiService/Program.cs(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code Quality Checks
- GitHub Check: Security Scan
🔇 Additional comments (3)
src/Bootstrapper/MeAjudaAi.ApiService/Program.cs (3)
7-7: LGTM!The namespace rename from
Catalogs.APItoServiceCatalogs.APIis consistent with the PR objective and follows the same pattern as other module imports.
37-37: LGTM!The service registration method rename is consistent with the namespace change and follows the established pattern for module registration.
111-111: Line 111 is correct and properly updated; old module folder can be cleaned up.The middleware registration has been successfully renamed and all active code references have been updated. Program.cs correctly calls
app.UseServiceCatalogsModule()at line 111 andbuilder.Services.AddServiceCatalogsModule()at line 37. The oldCatalogsmodule methods are no longer called anywhere in the active codebase.Minor housekeeping: The old
src/Modules/Catalogs/folder is now orphaned and unused. Consider removing it to complete the migration toServiceCatalogs.
…naming - Fix ServiceCatalogsDbContext schema: 'ServiceCatalogs' → 'service_catalogs' - Update ROADMAP.md module references to PascalCase for C# class names: * Section header: 'Módulo service_catalogs' → 'Módulo ServiceCatalogs' * Management reference: 'service_catalogs Management' → 'ServiceCatalogs Management' * Priority summary: 'service_catalogs' → 'ServiceCatalogs' - Resolves integration test failure: CatalogsSchema_ShouldExist - Maintains PostgreSQL snake_case convention for schema while using PascalCase for C# identifiers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/roadmap.md(9 hunks)src/Modules/ServiceCatalogs/Infrastructure/Persistence/ServiceCatalogsDbContext.cs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code Quality Checks
- GitHub Check: Security Scan
🔇 Additional comments (1)
docs/roadmap.md (1)
221-378: All previous review comments have been successfully addressed.This section now correctly implements all the naming convention corrections that were flagged in previous reviews:
✅ PascalCase fixes applied:
- Section header:
Módulo ServiceCatalogs(line 221)- Module API:
ServiceCatalogsModuleApi(line 278)- DbContext:
ServiceCatalogsDbContext(line 281)- Interface:
IServiceCatalogsModuleApi(lines 308, 313)- Management reference:
ServiceCatalogs Management(line 691)- Priority summary:
Módulo ServiceCatalogs(line 783)✅ Database schema naming: All references use correct snake_case (
service_catalogs) for the PostgreSQL schema, consistent with the project's database naming conventions.✅ Documentation quality: The ServiceCatalogs module section is comprehensive, well-structured, and includes domain architecture, all layers (Domain, Application, Infrastructure, API, Shared.Contracts), REST endpoints, public API interface, database schema, and next steps.
src/Modules/ServiceCatalogs/Infrastructure/Persistence/ServiceCatalogsDbContext.cs
Show resolved
Hide resolved
…ations - Update ServiceCatalogsDbContextFactory: 'ServiceCatalogs' → 'service_catalogs' in MigrationsHistoryTable - Update InitialCreate migration: all schema references to 'service_catalogs' - Update InitialCreate.Designer.cs: HasDefaultSchema to 'service_catalogs' - Update ModelSnapshot: HasDefaultSchema to 'service_catalogs' - Add new migration 20251119000000_RenameSchemaToSnakeCase: * Executes ALTER SCHEMA to rename existing 'ServiceCatalogs' to 'service_catalogs' * Idempotent: checks schema existence before renaming * Handles both fresh installs and schema migrations * Includes rollback support in Down() method This ensures consistency with PostgreSQL snake_case naming convention and resolves integration test failures where schema names didn't match.
Summary by CodeRabbit
Refactor
New Features
Tests
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.