Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a6df0f2
refactor: rename Catalogs to ServiceCatalogs - Phase 1a (Domain + Inf…
Nov 19, 2025
811e957
refactor: rename Catalogs to ServiceCatalogs - Phase 1b (Application …
Nov 19, 2025
b07d182
refactor: rename Catalogs to ServiceCatalogs - Phase 1c (Module Tests)
Nov 19, 2025
280a587
refactor: rename Catalogs to ServiceCatalogs - Phase 2 (Shared + Test…
Nov 19, 2025
df566da
merge: integrate Locations rename from master into Catalogs branch
Nov 19, 2025
0f6ad4f
merge: integrate latest changes from master (SearchProviders rename) …
Nov 19, 2025
32d206f
fix: update solution file to reflect Search → SearchProviders rename
Nov 19, 2025
8aed422
Merge branch 'master' into rename-domain-catalogs
Nov 19, 2025
d48f6a9
feat: add ServiceCatalogs module tests to solution (Phase 1c)
Nov 19, 2025
37e7204
feat: complete ServiceCatalogs module rename with Phase 2 integration
Nov 19, 2025
7a67606
fix: apply documentation and code quality improvements
Nov 19, 2025
ac7f9a5
fix: complete ServiceCatalogs module renaming consistency
Nov 19, 2025
2e74c66
refactor: update test class names and comments for ServiceCatalogs co…
Nov 19, 2025
7c64028
refactor: improve test code quality and maintainability
Nov 19, 2025
f3e6d4d
fix: complete naming consistency and strengthen test assertions
Nov 19, 2025
53c05c8
feat: register ServiceCatalogs module in ApiService
Nov 19, 2025
4f2cd6f
refactor: complete old Catalogs module removal and fix ROADMAP class …
Nov 19, 2025
aea3282
fix: correct ServiceCatalogs schema to snake_case and update ROADMAP …
Nov 19, 2025
72c518d
fix: standardize ServiceCatalogs schema to snake_case across all migr…
Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: complete naming consistency and strengthen test assertions
- 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
  • Loading branch information
Filipe Frigini committed Nov 19, 2025
commit f3e6d4dbc788172eb4242f50d18fd133685bd2a1
2 changes: 1 addition & 1 deletion docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public sealed class Service : AggregateRoot<ServiceId>
- **Versionamento**: Sistema unificado via BaseEndpoint

**5. Shared.Contracts** ✅
- `Iservice_catalogsModuleApi` - Interface pública
- `IServiceCatalogsModuleApi` - Interface pública
- DTOs: ModuleServiceCategoryDto, ModuleServiceDto, ModuleServiceListDto, ModuleServiceValidationResultDto

#### **API Pública Implementada**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static IServiceCollection AddServiceCatalogsTestInfrastructure(

dbOptions.UseNpgsql(connectionString, npgsqlOptions =>
{
npgsqlOptions.MigrationsAssembly("MeAjudaAi.Modules.ServiceCatalogs.Infrastructure");
npgsqlOptions.MigrationsAssembly(typeof(ServiceCatalogsDbContext).Assembly.FullName);
npgsqlOptions.MigrationsHistoryTable("__EFMigrationsHistory", options.Database.Schema);
npgsqlOptions.CommandTimeout(60);
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using MeAjudaAi.Modules.ServiceCatalogs.Domain.Repositories;
using MeAjudaAi.Modules.ServiceCatalogs.Domain.ValueObjects;
using MeAjudaAi.Modules.ServiceCatalogs.Tests.Builders;
using MeAjudaAi.Modules.ServiceCatalogs.Tests.Infrastructure;
using MeAjudaAi.Shared.Time;
using Domain = MeAjudaAi.Modules.ServiceCatalogs.Domain;

namespace MeAjudaAi.Modules.ServiceCatalogs.Tests.Integration;

Expand Down Expand Up @@ -79,6 +82,7 @@ public async Task GetAllAsync_WithActiveOnlyFilter_ShouldReturnOnlyActiveService

// Assert
result.Should().Contain(s => s.Id == activeService.Id);
result.Should().OnlyContain(s => s.IsActive, "all returned services should be active");
result.Should().NotContain(s => s.Id == inactiveService.Id);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/MeAjudaAi.Integration.Tests/Base/ApiTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ private static async Task ApplyMigrationsAsync(
await ApplyMigrationForContextAsync(usersContext, "Users", logger, "UsersDbContext primeiro (cria database e schema users)");
await ApplyMigrationForContextAsync(providersContext, "Providers", logger, "ProvidersDbContext (banco já existe, só precisa do schema providers)");
await ApplyMigrationForContextAsync(documentsContext, "Documents", logger, "DocumentsDbContext (banco já existe, só precisa do schema documents)");
await ApplyMigrationForContextAsync(catalogsContext, "Catalogs", logger, "ServiceCatalogsDbContext (banco já existe, só precisa do schema service_catalogs)");
await ApplyMigrationForContextAsync(catalogsContext, "ServiceCatalogs", logger, "ServiceCatalogsDbContext (banco já existe, só precisa do schema service_catalogs)");

// Verifica se as tabelas existem
await VerifyContextAsync(usersContext, "Users", () => usersContext.Users.CountAsync(), logger);
await VerifyContextAsync(providersContext, "Providers", () => providersContext.Providers.CountAsync(), logger);
await VerifyContextAsync(documentsContext, "Documents", () => documentsContext.Documents.CountAsync(), logger);
await VerifyContextAsync(catalogsContext, "Catalogs", () => catalogsContext.ServiceCategories.CountAsync(), logger);
await VerifyContextAsync(catalogsContext, "ServiceCatalogs", () => catalogsContext.ServiceCategories.CountAsync(), logger);
}

public async ValueTask DisposeAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void Should_Have_ServiceCatalogsDbContext_Registered()
[Fact]
public void Should_List_All_Registered_CommandHandlers()
{
// 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<,>);

Expand All @@ -78,10 +78,10 @@ public void Should_List_All_Registered_CommandHandlers()
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");

foreach (var handlerType in handlerTypes)
{
Expand Down
Loading