diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 21b28d8e..cd904664 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -10,6 +10,7 @@ jobs: pull_request: runs-on: self-hosted steps: + - uses: actions/checkout@v4 with: show-progress: 'false' diff --git a/MicroSaas.sln b/MicroSaas.sln index 09a9ea02..be28191d 100644 --- a/MicroSaas.sln +++ b/MicroSaas.sln @@ -70,6 +70,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{644DFC0E-D660-4C21-A3B0-40B264F88C8F}" ProjectSection(SolutionItems) = preProject .github\workflows\release.yml = .github\workflows\release.yml + .github\workflows\pull_request.yml = .github\workflows\pull_request.yml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{882D2D96-59E4-408F-AF68-9E83F4B454E1}" diff --git a/MicroSaas.sln.DotSettings.user b/MicroSaas.sln.DotSettings.user index 75f54e62..fb9a7433 100644 --- a/MicroSaas.sln.DotSettings.user +++ b/MicroSaas.sln.DotSettings.user @@ -1,4 +1,6 @@  + ForceIncluded + ForceIncluded <AssemblyExplorer> <Assembly Path="C:\dev\projects\MicroSaas\tests\Micro.Modules.IntegrationTests\bin\Debug\net8.0\Micro.Translations.Application.dll" /> <Assembly Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.4\System.Private.CoreLib.dll" /> @@ -12,14 +14,11 @@ D83D5413-12DA-49BE-89CA-3A55041DA1E1 1E66C0C9-DAA3-4E55-86C7-F6197E900D57 33ff99d8-b1ad-4ed5-a4fd-376b97c2c841 - <SessionState ContinuousTestingMode="0" IsActive="True" Name="Session" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> - <Or> - <And> - <ProjectFolder>303110BA-112C-4CF4-AE69-7376AA933F87/d:UseCases</ProjectFolder> - <Project Location="C:\dev\projects\MicroSaas\tests\Micro.Web.AcceptanceTests" Presentation="&lt;web&gt;\&lt;Micro.Web.AcceptanceTests&gt;" /> - </And> - <Project Location="C:\dev\projects\MicroSaas\tests\Micro.Modules.SystemTests" Presentation="&lt;tests&gt;\&lt;Micro.Modules.SystemTests&gt;" /> - </Or> + + <SessionState ContinuousTestingMode="0" IsActive="True" Name="Many_can_be_created_at_once" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> + <TestAncestor> + <TestId>xUnit::74F19403-CCCC-4B1C-9810-58E139698770::net9.0::Micro.Tenants.IntegrationTests.UseCases.Organisations.ParallelisationTest.Many_can_be_created_at_once</TestId> + </TestAncestor> </SessionState> @@ -55,6 +54,8 @@ + + diff --git a/docker-compose-acceptance-tests.yml b/docker-compose-acceptance-tests.yml index 6f55bd5d..4f5578fe 100644 --- a/docker-compose-acceptance-tests.yml +++ b/docker-compose-acceptance-tests.yml @@ -11,7 +11,6 @@ services: - DOTNET_CLI_TELEMETRY_OPTOUT=true - DOTNET_NUGET_SIGNATURE_VERIFICATION=false - WEB_HOST=web - - GITHUB_ACTIONS=${GITHUB_ACTIONS:-FALSE} entrypoint: - dotnet - test @@ -19,7 +18,6 @@ services: - --no-restore - --configuration=Release - --verbosity=quiet - - --logger=GitHubActions depends_on: - web diff --git a/docker-compose-integration-tests.sh b/docker-compose-integration-tests.sh deleted file mode 100644 index 1ac62922..00000000 --- a/docker-compose-integration-tests.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -echo "Run integration tests with coverage" -dotnet test --collect:"XPlat Code Coverage" --verbosity=quiet --filter=Type=Integration diff --git a/docker-compose-integration-tests.yml b/docker-compose-integration-tests.yml index 82593473..cc0c81e8 100644 --- a/docker-compose-integration-tests.yml +++ b/docker-compose-integration-tests.yml @@ -15,7 +15,6 @@ services: - DOTNET_NUGET_SIGNATURE_VERIFICATION=false - Logging:LogLevel:Default=Warning - DB_HOST=db - - GITHUB_ACTIONS=${GITHUB_ACTIONS:-FALSE} entrypoint: - dotnet - test @@ -24,7 +23,6 @@ services: - --configuration=Release - --verbosity=quiet - --filter=Type=Integration - - --logger=GitHubActions depends_on: - db diff --git a/docker-compose-system-tests.yml b/docker-compose-system-tests.yml index 91678a06..bacf8a85 100644 --- a/docker-compose-system-tests.yml +++ b/docker-compose-system-tests.yml @@ -15,7 +15,6 @@ services: - DOTNET_NUGET_SIGNATURE_VERIFICATION=false - Logging:LogLevel:Default=Warning - DB_HOST=db - - GITHUB_ACTIONS=${GITHUB_ACTIONS:-FALSE} entrypoint: - dotnet - test @@ -24,7 +23,6 @@ services: - --configuration=Release - --verbosity=quiet - --filter=Type=System - - --logger=GitHubActions depends_on: - db diff --git a/docker-compose-unit-tests.sh b/docker-compose-unit-tests.sh deleted file mode 100644 index 8e3c4f60..00000000 --- a/docker-compose-unit-tests.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -echo "Run unit tests with coverage" - diff --git a/docker-compose-unit-tests.yml b/docker-compose-unit-tests.yml index de7a0f43..e56455d0 100644 --- a/docker-compose-unit-tests.yml +++ b/docker-compose-unit-tests.yml @@ -13,7 +13,6 @@ services: - DOTNET_CLI_TELEMETRY_OPTOUT=true - DOTNET_NUGET_SIGNATURE_VERIFICATION=false - Logging:LogLevel:Default=Warning - - GITHUB_ACTIONS=${GITHUB_ACTIONS:-FALSE} entrypoint: - dotnet - test @@ -21,5 +20,4 @@ services: - --collect:"XPlat Code Coverage" - --configuration=Release - --verbosity=quiet - - --filter=Type=Unit - - --logger=GitHubActions \ No newline at end of file + - --filter=Type=Unit \ No newline at end of file diff --git a/run-docker-compose-build.sh b/run-docker-compose-build.sh index ca2a32c2..7635ba01 100755 --- a/run-docker-compose-build.sh +++ b/run-docker-compose-build.sh @@ -4,4 +4,5 @@ set -e docker compose -f docker-compose.yml build docker compose -f docker-compose-unit-tests.yml build docker compose -f docker-compose-integration-tests.yml build +docker compose -f docker-compose-system-tests.yml build docker compose -f docker-compose-acceptance-tests.yml build diff --git a/run-docker-compose-test.sh b/run-docker-compose-test.sh index 8119c36f..eb113cab 100755 --- a/run-docker-compose-test.sh +++ b/run-docker-compose-test.sh @@ -8,9 +8,13 @@ run_tests() { docker compose --progress quiet -f "${compose_file}" up \ --force-recreate \ --remove-orphans \ - --no-log-prefix \ --abort-on-container-exit \ --exit-code-from "${test_type}-tests" + + if [ $? -ne 0 ]; then + echo "::error file=${compose_file},line=1,col=1::${test_type^} tests failed" + exit 1 + fi } echo "::notice ::Running tests..." diff --git a/src/Micro.Cli/Accessor.cs b/src/Micro.Cli/Accessor.cs index ee079deb..a308379e 100644 --- a/src/Micro.Cli/Accessor.cs +++ b/src/Micro.Cli/Accessor.cs @@ -1,9 +1,8 @@ using Micro.Common.Application; -namespace Micro.Cli +namespace Micro.Cli; + +public class Accessor : IExecutionContextAccessor { - public class Accessor : IExecutionContextAccessor - { - public IExecutionContext ExecutionContext { get; set; } = null!; - } + public IExecutionContext ExecutionContext { get; init; } = null!; } \ No newline at end of file diff --git a/src/Micro.Cli/Micro.Cli.csproj b/src/Micro.Cli/Micro.Cli.csproj index e663330f..006849dd 100644 --- a/src/Micro.Cli/Micro.Cli.csproj +++ b/src/Micro.Cli/Micro.Cli.csproj @@ -12,7 +12,7 @@ .dockerignore - + PreserveNewest @@ -25,9 +25,9 @@ - - - + + + diff --git a/src/Micro.Common/Application/ProcessInboxCommand.cs b/src/Micro.Common/Application/ProcessInboxCommand.cs index dae952db..81fdbb3a 100644 --- a/src/Micro.Common/Application/ProcessInboxCommand.cs +++ b/src/Micro.Common/Application/ProcessInboxCommand.cs @@ -2,10 +2,6 @@ namespace Micro.Common.Application; -public class ProcessInboxCommand : IRequest -{ -} +public class ProcessInboxCommand : IRequest; -public class ProcessInboxCommandValidator : AbstractValidator -{ -} \ No newline at end of file +public class ProcessInboxCommandValidator : AbstractValidator; \ No newline at end of file diff --git a/src/Micro.Common/Application/ProcessOutboxCommand.cs b/src/Micro.Common/Application/ProcessOutboxCommand.cs index c3bb780f..f769487e 100644 --- a/src/Micro.Common/Application/ProcessOutboxCommand.cs +++ b/src/Micro.Common/Application/ProcessOutboxCommand.cs @@ -2,10 +2,6 @@ namespace Micro.Common.Application; -public class ProcessOutboxCommand : IRequest -{ -} +public class ProcessOutboxCommand : IRequest; -public class ProcessOutboxCommandValidator : AbstractValidator -{ -} \ No newline at end of file +public class ProcessOutboxCommandValidator : AbstractValidator; \ No newline at end of file diff --git a/src/Micro.Common/Application/ProcessQueueCommand.cs b/src/Micro.Common/Application/ProcessQueueCommand.cs index ea239f19..d1412585 100644 --- a/src/Micro.Common/Application/ProcessQueueCommand.cs +++ b/src/Micro.Common/Application/ProcessQueueCommand.cs @@ -2,10 +2,6 @@ namespace Micro.Common.Application; -public class ProcessQueueCommand : IRequest -{ -} +public class ProcessQueueCommand : IRequest; -public class ProcessQueueCommandValidator : AbstractValidator -{ -} \ No newline at end of file +public class ProcessQueueCommandValidator : AbstractValidator; \ No newline at end of file diff --git a/src/Micro.Common/BaseModule.cs b/src/Micro.Common/BaseModule.cs index f58d4df4..cfb6cab3 100644 --- a/src/Micro.Common/BaseModule.cs +++ b/src/Micro.Common/BaseModule.cs @@ -4,30 +4,32 @@ namespace Micro.Common; public class BaseModule { - private readonly Func _scopeFactory; + private readonly Func _scopeFactory; - protected BaseModule(Func scopeFactory) + protected BaseModule(Func scopeFactory) { _scopeFactory = scopeFactory; } public async Task SendCommand(IRequest command) { - using var scope = _scopeFactory.Invoke(); + await using var scope = _scopeFactory.Invoke(); + var logger = scope.ServiceProvider.GetRequiredService>(); + logger.LogDebug("Sending command {Command}", command); var dispatcher = scope.ServiceProvider.GetRequiredService(); await dispatcher.Send(command); } public async Task SendQuery(IRequest query) { - using var scope = _scopeFactory.Invoke(); + await using var scope = _scopeFactory.Invoke(); var dispatcher = scope.ServiceProvider.GetRequiredService(); return await dispatcher.Send(query); } public async Task PublishNotification(INotification notification) { - using var scope = _scopeFactory.Invoke(); + await using var scope = _scopeFactory.Invoke(); var dispatcher = scope.ServiceProvider.GetRequiredService(); await dispatcher.Publish(notification); } diff --git a/src/Micro.Common/Micro.Common.csproj b/src/Micro.Common/Micro.Common.csproj index ea43b4f6..9c0ed33b 100644 --- a/src/Micro.Common/Micro.Common.csproj +++ b/src/Micro.Common/Micro.Common.csproj @@ -8,25 +8,25 @@ - - - - - + + + + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - - - - + + + + diff --git a/src/Micro.Proxy/Dockerfile b/src/Micro.Proxy/Dockerfile index 2b917d72..2488d19b 100644 --- a/src/Micro.Proxy/Dockerfile +++ b/src/Micro.Proxy/Dockerfile @@ -1,10 +1,10 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER $APP_UID WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["src/Micro.Proxy/Micro.Proxy.csproj", "src/Micro.Proxy/"] diff --git a/src/Micro.Proxy/Micro.Proxy.csproj b/src/Micro.Proxy/Micro.Proxy.csproj index c0c6c51e..082bb0d1 100644 --- a/src/Micro.Proxy/Micro.Proxy.csproj +++ b/src/Micro.Proxy/Micro.Proxy.csproj @@ -1,13 +1,13 @@ - net8.0 + net9.0 enable enable Linux - + diff --git a/src/Micro.Tenants.Application/Organisations/Commands/DeleteOrganisation.cs b/src/Micro.Tenants.Application/Organisations/Commands/DeleteOrganisation.cs index 28387be3..0430a2b4 100644 --- a/src/Micro.Tenants.Application/Organisations/Commands/DeleteOrganisation.cs +++ b/src/Micro.Tenants.Application/Organisations/Commands/DeleteOrganisation.cs @@ -4,9 +4,7 @@ public static class DeleteOrganisation { public record Command : IRequest; - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IExecutionContext context, IOrganisationRepository organisations) : IRequestHandler { diff --git a/src/Micro.Tenants.Application/Organisations/Queries/GetOrganisationByContext.cs b/src/Micro.Tenants.Application/Organisations/Queries/GetOrganisationByContext.cs index f4c3f6ad..6e484265 100644 --- a/src/Micro.Tenants.Application/Organisations/Queries/GetOrganisationByContext.cs +++ b/src/Micro.Tenants.Application/Organisations/Queries/GetOrganisationByContext.cs @@ -6,9 +6,7 @@ public record Query : IRequest; public record Result(Guid Id, string Name); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IExecutionContext context, IOrganisationRepository organisations) : IRequestHandler { diff --git a/src/Micro.Tenants.Application/Organisations/Queries/GetProjectByContext.cs b/src/Micro.Tenants.Application/Organisations/Queries/GetProjectByContext.cs index 16367844..89f9359a 100644 --- a/src/Micro.Tenants.Application/Organisations/Queries/GetProjectByContext.cs +++ b/src/Micro.Tenants.Application/Organisations/Queries/GetProjectByContext.cs @@ -6,9 +6,7 @@ public record Query : IRequest; public record Result(Guid Id, string Name); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IExecutionContext context, IOrganisationRepository organisations) : IRequestHandler { diff --git a/src/Micro.Tenants.Infrastructure/Database/Migrations/Migration1.cs b/src/Micro.Tenants.Infrastructure/Database/Migrations/Migration1.cs index 3fb4adf6..2596c88e 100644 --- a/src/Micro.Tenants.Infrastructure/Database/Migrations/Migration1.cs +++ b/src/Micro.Tenants.Infrastructure/Database/Migrations/Migration1.cs @@ -20,7 +20,6 @@ public override void Up() .WithColumn(RoleColumn).AsString(RoleMaxLength) .WithColumn(CreatedAt).AsDateTimeOffset() .WithColumn(UpdatedAt).AsDateTimeOffset().Nullable(); - ; Create.Table(UsersTable) .WithColumn(IdColumn).AsGuid().PrimaryKey() @@ -32,7 +31,6 @@ public override void Up() .WithColumn(NameColumn).AsString(NameMaxLength) .WithColumn(CreatedAt).AsDateTimeOffset() .WithColumn(UpdatedAt).AsDateTimeOffset().Nullable(); - ; Create.ForeignKey($"fk_{MembershipsTable}_{OrganisationsTable}") .FromTable(MembershipsTable).ForeignColumn(OrganisationIdColumn) diff --git a/src/Micro.Tenants.Infrastructure/Micro.Tenants.Infrastructure.csproj b/src/Micro.Tenants.Infrastructure/Micro.Tenants.Infrastructure.csproj index 18697e4b..6d33a5ca 100644 --- a/src/Micro.Tenants.Infrastructure/Micro.Tenants.Infrastructure.csproj +++ b/src/Micro.Tenants.Infrastructure/Micro.Tenants.Infrastructure.csproj @@ -7,20 +7,20 @@ - - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - - + + + diff --git a/src/Micro.Tenants.Infrastructure/ServiceCollectionExtensions.cs b/src/Micro.Tenants.Infrastructure/ServiceCollectionExtensions.cs index f840b225..c3adaab6 100644 --- a/src/Micro.Tenants.Infrastructure/ServiceCollectionExtensions.cs +++ b/src/Micro.Tenants.Infrastructure/ServiceCollectionExtensions.cs @@ -35,7 +35,7 @@ public static IServiceCollection AddServices(this IServiceCollection services, I services.AddSingleton(_ => new ConnectionFactory(connectionString)); // Services - services.AddSingleton(); + services.AddScoped(); // Repositories services.AddScoped(); @@ -54,8 +54,8 @@ public static IServiceCollection AddServices(this IServiceCollection services, I { options.UseNpgsql(connectionString); options.UseLoggerFactory(ctx.GetRequiredService()); - // options.EnableSensitiveDataLogging(); - // options.EnableDetailedErrors(); + options.EnableSensitiveDataLogging(); + options.EnableDetailedErrors(); }); // Inbox/Outbox diff --git a/src/Micro.Tenants.Infrastructure/TenantsCompositionRoot.cs b/src/Micro.Tenants.Infrastructure/TenantsCompositionRoot.cs index 92000388..4a432b1b 100644 --- a/src/Micro.Tenants.Infrastructure/TenantsCompositionRoot.cs +++ b/src/Micro.Tenants.Infrastructure/TenantsCompositionRoot.cs @@ -12,4 +12,7 @@ public static void SetProvider(IServiceProvider provider) public static IServiceScope BeginLifetimeScope() => _provider?.CreateScope() ?? throw new Exception("Service provider not set."); + + public static AsyncServiceScope BeginAsyncLifetimeScope() => + _provider?.CreateAsyncScope() ?? throw new Exception("Service provider not set."); } \ No newline at end of file diff --git a/src/Micro.Tenants.Infrastructure/TenantsModule.cs b/src/Micro.Tenants.Infrastructure/TenantsModule.cs index 17af318a..6e349cd6 100644 --- a/src/Micro.Tenants.Infrastructure/TenantsModule.cs +++ b/src/Micro.Tenants.Infrastructure/TenantsModule.cs @@ -3,4 +3,4 @@ public interface ITenantsModule : IModule; [ExcludeFromCodeCoverage] -public class TenantsModule() : BaseModule(TenantsCompositionRoot.BeginLifetimeScope), ITenantsModule; \ No newline at end of file +public class TenantsModule() : BaseModule(TenantsCompositionRoot.BeginAsyncLifetimeScope), ITenantsModule; \ No newline at end of file diff --git a/src/Micro.Tenants.Web/Micro.Tenants.Web.csproj b/src/Micro.Tenants.Web/Micro.Tenants.Web.csproj index a7377095..eeed57d2 100644 --- a/src/Micro.Tenants.Web/Micro.Tenants.Web.csproj +++ b/src/Micro.Tenants.Web/Micro.Tenants.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Micro.Tenants.Web/Pages/Organisations/Create.cshtml.cs b/src/Micro.Tenants.Web/Pages/Organisations/Create.cshtml.cs index 275263f6..79256045 100644 --- a/src/Micro.Tenants.Web/Pages/Organisations/Create.cshtml.cs +++ b/src/Micro.Tenants.Web/Pages/Organisations/Create.cshtml.cs @@ -23,7 +23,7 @@ public async Task OnPostAsync() } catch (PlatformException e) { - ModelState.AddModelError(string.Empty, e.Message!); + ModelState.AddModelError(string.Empty, e.Message); return Page(); } } diff --git a/src/Micro.Tenants.Web/Pages/Project/Details.cshtml.cs b/src/Micro.Tenants.Web/Pages/Project/Details.cshtml.cs index 9ecde20d..17fe9165 100644 --- a/src/Micro.Tenants.Web/Pages/Project/Details.cshtml.cs +++ b/src/Micro.Tenants.Web/Pages/Project/Details.cshtml.cs @@ -2,6 +2,4 @@ namespace Micro.Tenants.Web.Pages.Project; -public class Details(IPageContextAccessor context) : ContextualPageModel(context) -{ -} \ No newline at end of file +public class Details(IPageContextAccessor context) : ContextualPageModel(context); \ No newline at end of file diff --git a/src/Micro.Tenants.Web/Pages/Projects/Create.cshtml.cs b/src/Micro.Tenants.Web/Pages/Projects/Create.cshtml.cs index bd5a0040..2cd83a53 100644 --- a/src/Micro.Tenants.Web/Pages/Projects/Create.cshtml.cs +++ b/src/Micro.Tenants.Web/Pages/Projects/Create.cshtml.cs @@ -25,7 +25,7 @@ public async Task OnPostAsync() } catch (PlatformException e) { - ModelState.AddModelError(string.Empty, e.Message!); + ModelState.AddModelError(string.Empty, e.Message); return Page(); } } diff --git a/src/Micro.Translations.Application/Queries/ListAllLanguages.cs b/src/Micro.Translations.Application/Queries/ListAllLanguages.cs index 0deff443..a8c7361a 100644 --- a/src/Micro.Translations.Application/Queries/ListAllLanguages.cs +++ b/src/Micro.Translations.Application/Queries/ListAllLanguages.cs @@ -9,9 +9,7 @@ public record Query : IRequest>; public record Result(string Code, string Name); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler : IRequestHandler> { diff --git a/src/Micro.Translations.Application/Queries/ListLanguages.cs b/src/Micro.Translations.Application/Queries/ListLanguages.cs index 48c91861..6d0b0d1d 100644 --- a/src/Micro.Translations.Application/Queries/ListLanguages.cs +++ b/src/Micro.Translations.Application/Queries/ListLanguages.cs @@ -6,9 +6,7 @@ public record Query : IRequest>; public record Result(Guid Id, string Name, string Code); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IDbConnection db, IExecutionContext context) : IRequestHandler> { diff --git a/src/Micro.Translations.Application/Queries/ListLanguagesTranslated.cs b/src/Micro.Translations.Application/Queries/ListLanguagesTranslated.cs index 8f95c47a..5fdbbba5 100644 --- a/src/Micro.Translations.Application/Queries/ListLanguagesTranslated.cs +++ b/src/Micro.Translations.Application/Queries/ListLanguagesTranslated.cs @@ -6,9 +6,7 @@ public record Query : IRequest>; public record Result(Guid Id, string Name, string Code); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IDbConnection db, IExecutionContext context) : IRequestHandler> { diff --git a/src/Micro.Translations.Infrastructure/Database/Repositories/LanguageRepository.cs b/src/Micro.Translations.Infrastructure/Database/Repositories/LanguageRepository.cs index 6bf8841d..20bff8b6 100644 --- a/src/Micro.Translations.Infrastructure/Database/Repositories/LanguageRepository.cs +++ b/src/Micro.Translations.Infrastructure/Database/Repositories/LanguageRepository.cs @@ -12,8 +12,11 @@ await db.Languages .SingleOrDefaultAsync(x => x.LanguageId.Equals(id), token); public async Task GetAsync(ProjectId projectId, string code, CancellationToken cancellationToken) => - await db.Languages.SingleOrDefaultAsync(x => x.ProjectId == projectId && x.Detail.Code == code, cancellationToken); + await db.Languages + .SingleOrDefaultAsync(x => x.ProjectId == projectId && x.Detail.Code == code, cancellationToken); public async Task> ListAsync(ProjectId projectId, CancellationToken token) => - await db.Languages.Where(x => x.ProjectId == projectId).ToListAsync(token); + await db.Languages + .Where(x => x.ProjectId == projectId) + .ToListAsync(token); } \ No newline at end of file diff --git a/src/Micro.Translations.Infrastructure/Micro.Translations.Infrastructure.csproj b/src/Micro.Translations.Infrastructure/Micro.Translations.Infrastructure.csproj index 3849fc83..90daef64 100644 --- a/src/Micro.Translations.Infrastructure/Micro.Translations.Infrastructure.csproj +++ b/src/Micro.Translations.Infrastructure/Micro.Translations.Infrastructure.csproj @@ -7,20 +7,20 @@ - - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - - + + + diff --git a/src/Micro.Translations.Infrastructure/ServiceCollectionExtensions.cs b/src/Micro.Translations.Infrastructure/ServiceCollectionExtensions.cs index 8e4a336e..94af4293 100644 --- a/src/Micro.Translations.Infrastructure/ServiceCollectionExtensions.cs +++ b/src/Micro.Translations.Infrastructure/ServiceCollectionExtensions.cs @@ -52,8 +52,8 @@ public static IServiceCollection AddServices(this IServiceCollection services, I { options.UseNpgsql(connectionString); options.UseLoggerFactory(ctx.GetRequiredService()); - // options.EnableSensitiveDataLogging(); - // options.EnableDetailedErrors(); + options.EnableSensitiveDataLogging(); + options.EnableDetailedErrors(); }); // Inbox/Outbox diff --git a/src/Micro.Translations.Infrastructure/TranslationModule.cs b/src/Micro.Translations.Infrastructure/TranslationModule.cs index 108301c6..75baf524 100644 --- a/src/Micro.Translations.Infrastructure/TranslationModule.cs +++ b/src/Micro.Translations.Infrastructure/TranslationModule.cs @@ -5,4 +5,4 @@ namespace Micro.Translations.Infrastructure; public interface ITranslationModule : IModule; [ExcludeFromCodeCoverage] -public class TranslationModule() : BaseModule(TranslationsCompositionRoot.BeginLifetimeScope), ITranslationModule; \ No newline at end of file +public class TranslationModule() : BaseModule(TranslationsCompositionRoot.BeginAsyncLifetimeScope), ITranslationModule; \ No newline at end of file diff --git a/src/Micro.Translations.Infrastructure/TranslationsCompositionRoot.cs b/src/Micro.Translations.Infrastructure/TranslationsCompositionRoot.cs index b9fb6075..9e86bec9 100644 --- a/src/Micro.Translations.Infrastructure/TranslationsCompositionRoot.cs +++ b/src/Micro.Translations.Infrastructure/TranslationsCompositionRoot.cs @@ -12,4 +12,7 @@ public static void SetProvider(IServiceProvider provider) public static IServiceScope BeginLifetimeScope() => _provider?.CreateScope() ?? throw new Exception("Service provider not set."); + + public static AsyncServiceScope BeginAsyncLifetimeScope() => + _provider?.CreateAsyncScope() ?? throw new Exception("Service provider not set."); } \ No newline at end of file diff --git a/src/Micro.Translations.Web/Micro.Translations.Web.csproj b/src/Micro.Translations.Web/Micro.Translations.Web.csproj index b161ae35..cec1f06a 100644 --- a/src/Micro.Translations.Web/Micro.Translations.Web.csproj +++ b/src/Micro.Translations.Web/Micro.Translations.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Micro.Users.Application/ApiKeys/Queries/List.cs b/src/Micro.Users.Application/ApiKeys/Queries/List.cs index 3f6bdb37..a441fd34 100644 --- a/src/Micro.Users.Application/ApiKeys/Queries/List.cs +++ b/src/Micro.Users.Application/ApiKeys/Queries/List.cs @@ -6,9 +6,7 @@ public record Query : IRequest>; public record Result(Guid Id, string Name); - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IApiKeyRepository keys, IExecutionContext context) : IRequestHandler> { diff --git a/src/Micro.Users.Application/Micro.Users.Application.csproj b/src/Micro.Users.Application/Micro.Users.Application.csproj index 7facfd5c..225358df 100644 --- a/src/Micro.Users.Application/Micro.Users.Application.csproj +++ b/src/Micro.Users.Application/Micro.Users.Application.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Micro.Users.Application/Users/Commands/ForgotPassword.cs b/src/Micro.Users.Application/Users/Commands/ForgotPassword.cs index 0c32cb80..45997156 100644 --- a/src/Micro.Users.Application/Users/Commands/ForgotPassword.cs +++ b/src/Micro.Users.Application/Users/Commands/ForgotPassword.cs @@ -4,9 +4,7 @@ public static class ForgotPassword { public record Command(string Email) : IRequest; - public class Validator : AbstractValidator - { - } + public class Validator : AbstractValidator; public class Handler(IUserRepository users) : IRequestHandler { diff --git a/src/Micro.Users.Infrastructure/Micro.Users.Infrastructure.csproj b/src/Micro.Users.Infrastructure/Micro.Users.Infrastructure.csproj index 8b6b1b6f..d6a7e946 100644 --- a/src/Micro.Users.Infrastructure/Micro.Users.Infrastructure.csproj +++ b/src/Micro.Users.Infrastructure/Micro.Users.Infrastructure.csproj @@ -15,10 +15,10 @@ - - - - + + + + diff --git a/src/Micro.Users.Infrastructure/ServiceCollectionExtensions.cs b/src/Micro.Users.Infrastructure/ServiceCollectionExtensions.cs index f1f4c7a1..52747418 100644 --- a/src/Micro.Users.Infrastructure/ServiceCollectionExtensions.cs +++ b/src/Micro.Users.Infrastructure/ServiceCollectionExtensions.cs @@ -66,8 +66,8 @@ public static IServiceCollection AddServices(this IServiceCollection services, I { options.UseNpgsql(connectionString); options.UseLoggerFactory(ctx.GetRequiredService()); - // options.EnableSensitiveDataLogging(); - // options.EnableDetailedErrors(); + options.EnableSensitiveDataLogging(); + options.EnableDetailedErrors(); }); // Inbox/Outbox diff --git a/src/Micro.Users.Infrastructure/UsersCompositionRoot.cs b/src/Micro.Users.Infrastructure/UsersCompositionRoot.cs index ca91ce3a..f8f2c480 100644 --- a/src/Micro.Users.Infrastructure/UsersCompositionRoot.cs +++ b/src/Micro.Users.Infrastructure/UsersCompositionRoot.cs @@ -12,4 +12,7 @@ public static void SetProvider(IServiceProvider provider) public static IServiceScope BeginLifetimeScope() => _provider?.CreateScope() ?? throw new Exception("Service provider not set."); + + public static AsyncServiceScope BeginAsyncLifetimeScope() => + _provider?.CreateAsyncScope() ?? throw new Exception("Service provider not set."); } \ No newline at end of file diff --git a/src/Micro.Users.Infrastructure/UsersModule.cs b/src/Micro.Users.Infrastructure/UsersModule.cs index 815b2713..811756f6 100644 --- a/src/Micro.Users.Infrastructure/UsersModule.cs +++ b/src/Micro.Users.Infrastructure/UsersModule.cs @@ -3,4 +3,4 @@ public interface IUsersModule : IModule; [ExcludeFromCodeCoverage] -public class UsersModule() : BaseModule(UsersCompositionRoot.BeginLifetimeScope), IUsersModule; \ No newline at end of file +public class UsersModule() : BaseModule(UsersCompositionRoot.BeginAsyncLifetimeScope), IUsersModule; \ No newline at end of file diff --git a/src/Micro.Users.Web/Micro.Users.Web.csproj b/src/Micro.Users.Web/Micro.Users.Web.csproj index ec55c049..6506b55c 100644 --- a/src/Micro.Users.Web/Micro.Users.Web.csproj +++ b/src/Micro.Users.Web/Micro.Users.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Micro.Users.Web/Pages/ApiKeys/Add.cshtml.cs b/src/Micro.Users.Web/Pages/ApiKeys/Add.cshtml.cs index cfa6636e..d880a59c 100644 --- a/src/Micro.Users.Web/Pages/ApiKeys/Add.cshtml.cs +++ b/src/Micro.Users.Web/Pages/ApiKeys/Add.cshtml.cs @@ -26,7 +26,7 @@ public async Task OnPostAsync() } catch (PlatformException e) { - ModelState.AddModelError(string.Empty, e.Message!); + ModelState.AddModelError(string.Empty, e.Message); return Page(); } } diff --git a/src/Micro.Users.Web/Pages/Auth/Forbidden.cshtml.cs b/src/Micro.Users.Web/Pages/Auth/Forbidden.cshtml.cs index 05c313d4..f1771442 100644 --- a/src/Micro.Users.Web/Pages/Auth/Forbidden.cshtml.cs +++ b/src/Micro.Users.Web/Pages/Auth/Forbidden.cshtml.cs @@ -1,5 +1,3 @@ namespace Micro.Users.Web.Pages.Auth; -public class Forbidden : PageModel -{ -} \ No newline at end of file +public class Forbidden : PageModel; \ No newline at end of file diff --git a/src/Micro.Web/Files/DataProtectionKey.xml b/src/Micro.Web/Files/DataProtectionKey.xml index d064a9d5..0389a951 100644 --- a/src/Micro.Web/Files/DataProtectionKey.xml +++ b/src/Micro.Web/Files/DataProtectionKey.xml @@ -1,15 +1,15 @@  - - 2024-05-01T12:59:40.0429734Z - 2024-05-01T12:59:40.0392167Z - 2024-07-30T12:59:40.0392167Z - + + 2024-12-23T11:31:10.3756987Z + 2024-12-23T11:31:10.3756987Z + 2025-03-23T11:31:10.3756987Z + - SxHSNtrKFRc6/xFCO8oX9OIOann0/iPuSxLJrjdHqAzs61JHzbm3DzO0HyjDAkFAU0WVCq4o9yUCnxRVcbZhBw== + q3ZCFnXXQX2WwIU7zJc/vxZycQr2xvGx0r/7ndhW0wcnvZJhCdTJkbqiB9/dzW0uchpfweiIkKIzoEQVD9iuRw== diff --git a/src/Micro.Web/Micro.Web.csproj b/src/Micro.Web/Micro.Web.csproj index 2406bad8..ae5d036c 100644 --- a/src/Micro.Web/Micro.Web.csproj +++ b/src/Micro.Web/Micro.Web.csproj @@ -15,9 +15,6 @@ PreserveNewest - - PreserveNewest - @@ -31,8 +28,12 @@ - + + + + + diff --git a/src/Micro.Web/Program.cs b/src/Micro.Web/Program.cs index 11cf9b93..a7925e5d 100644 --- a/src/Micro.Web/Program.cs +++ b/src/Micro.Web/Program.cs @@ -30,10 +30,9 @@ builder.Services.AddLogging(c => { c.AddSimpleConsole(x => { x.SingleLine = true; }); }); // Data protection keys, necessary for multiple instances of the web server -var keysFolder = Path.Combine(builder.Environment.ContentRootPath, "Files"); builder.Services .AddDataProtection() - .PersistKeysToFileSystem(new DirectoryInfo(keysFolder)) + .PersistKeysToFileSystem(new DirectoryInfo(Path.Combine(builder.Environment.ContentRootPath, "Files"))) .SetApplicationName(nameof(Micro.Web)); // Add services to the container. @@ -137,7 +136,7 @@ }); app.MapHealthChecks("/health/ready", new HealthCheckOptions { - Predicate = checks => checks.Tags.Contains("db"), + Predicate = checks => checks.Tags.Contains("db") }); var usersApi = app.MapGroup("/api/users"); diff --git a/tests/Micro.Common.UnitTests/Micro.Common.UnitTests.csproj b/tests/Micro.Common.UnitTests/Micro.Common.UnitTests.csproj index e3e7801a..3f0cd7fd 100644 --- a/tests/Micro.Common.UnitTests/Micro.Common.UnitTests.csproj +++ b/tests/Micro.Common.UnitTests/Micro.Common.UnitTests.csproj @@ -10,16 +10,12 @@ - - all - runtime; build; native; contentfiles; analyzers - - - - - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Modules.SystemTests/Micro.Modules.SystemTests.csproj b/tests/Micro.Modules.SystemTests/Micro.Modules.SystemTests.csproj index 7ec9d1dc..8da6d4c6 100644 --- a/tests/Micro.Modules.SystemTests/Micro.Modules.SystemTests.csproj +++ b/tests/Micro.Modules.SystemTests/Micro.Modules.SystemTests.csproj @@ -9,19 +9,15 @@ - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Tenants.Domain.UnitTests/Micro.Tenants.Domain.UnitTests.csproj b/tests/Micro.Tenants.Domain.UnitTests/Micro.Tenants.Domain.UnitTests.csproj index 9e3b3820..711f3305 100644 --- a/tests/Micro.Tenants.Domain.UnitTests/Micro.Tenants.Domain.UnitTests.csproj +++ b/tests/Micro.Tenants.Domain.UnitTests/Micro.Tenants.Domain.UnitTests.csproj @@ -9,14 +9,10 @@ - - - all - runtime; build; native; contentfiles; analyzers - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Tenants.IntegrationTests/Fixtures/ServiceFixtureCollection.cs b/tests/Micro.Tenants.IntegrationTests/Fixtures/ServiceFixtureCollection.cs index 6efa2aea..8fba33ff 100644 --- a/tests/Micro.Tenants.IntegrationTests/Fixtures/ServiceFixtureCollection.cs +++ b/tests/Micro.Tenants.IntegrationTests/Fixtures/ServiceFixtureCollection.cs @@ -1,6 +1,4 @@ namespace Micro.Tenants.IntegrationTests.Fixtures; [CollectionDefinition(nameof(ServiceFixtureCollection))] -public class ServiceFixtureCollection : ICollectionFixture -{ -} \ No newline at end of file +public class ServiceFixtureCollection : ICollectionFixture; \ No newline at end of file diff --git a/tests/Micro.Tenants.IntegrationTests/Micro.Tenants.IntegrationTests.csproj b/tests/Micro.Tenants.IntegrationTests/Micro.Tenants.IntegrationTests.csproj index f7798f51..ac94d4f6 100644 --- a/tests/Micro.Tenants.IntegrationTests/Micro.Tenants.IntegrationTests.csproj +++ b/tests/Micro.Tenants.IntegrationTests/Micro.Tenants.IntegrationTests.csproj @@ -9,19 +9,15 @@ - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ParallelisationTest.cs b/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ParallelisationTest.cs new file mode 100644 index 00000000..71eab63d --- /dev/null +++ b/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ParallelisationTest.cs @@ -0,0 +1,26 @@ +using Micro.Tenants.Application.Organisations.Commands; + +namespace Micro.Tenants.IntegrationTests.UseCases.Organisations; + +[Collection(nameof(ServiceFixtureCollection))] +public class ParallelisationTest(ServiceFixture service, ITestOutputHelper outputHelper) + : BaseTest(service, outputHelper) +{ + [Fact] + public async Task Many_can_be_created_at_once() + { + + // arrange + var userId = await GivenUser(); + var commands = Enumerable.Range(0, 10) + .Select(_ => new CreateOrganisation.Command(Guid.NewGuid(), Guid.NewGuid().ToString()[..10])) + .ToList(); + + // act + + var tasks = commands.Select(command => Service.Command(command, userId)); + await Task.WhenAll(tasks); + + // assert + } +} \ No newline at end of file diff --git a/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ProjectTests.cs b/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ProjectTests.cs index 7a781a18..6213466a 100644 --- a/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ProjectTests.cs +++ b/tests/Micro.Tenants.IntegrationTests/UseCases/Organisations/ProjectTests.cs @@ -13,7 +13,6 @@ public async Task Can_manage_project() var userId = await GivenUser(); var organisationId = await GivenOrganisation(userId); var projectId = Guid.NewGuid(); - var orgName = Guid.NewGuid().ToString()[..10]; var projectName = Guid.NewGuid().ToString()[..10]; var projectNameUpdated = Guid.NewGuid().ToString()[..10]; diff --git a/tests/Micro.Translations.Domain.UnitTests/Micro.Translations.Domain.UnitTests.csproj b/tests/Micro.Translations.Domain.UnitTests/Micro.Translations.Domain.UnitTests.csproj index 78269f78..019b13ce 100644 --- a/tests/Micro.Translations.Domain.UnitTests/Micro.Translations.Domain.UnitTests.csproj +++ b/tests/Micro.Translations.Domain.UnitTests/Micro.Translations.Domain.UnitTests.csproj @@ -10,15 +10,11 @@ - - - all - runtime; build; native; contentfiles; analyzers - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Translations.IntegrationTests/Fixtures/ServiceFixtureCollection.cs b/tests/Micro.Translations.IntegrationTests/Fixtures/ServiceFixtureCollection.cs index 31638b3b..8acbd53c 100644 --- a/tests/Micro.Translations.IntegrationTests/Fixtures/ServiceFixtureCollection.cs +++ b/tests/Micro.Translations.IntegrationTests/Fixtures/ServiceFixtureCollection.cs @@ -1,6 +1,4 @@ namespace Micro.Translations.IntegrationTests.Fixtures; [CollectionDefinition(nameof(ServiceFixtureCollection))] -public class ServiceFixtureCollection : ICollectionFixture -{ -} \ No newline at end of file +public class ServiceFixtureCollection : ICollectionFixture; \ No newline at end of file diff --git a/tests/Micro.Translations.IntegrationTests/Micro.Translations.IntegrationTests.csproj b/tests/Micro.Translations.IntegrationTests/Micro.Translations.IntegrationTests.csproj index 016fd5d6..0142068a 100644 --- a/tests/Micro.Translations.IntegrationTests/Micro.Translations.IntegrationTests.csproj +++ b/tests/Micro.Translations.IntegrationTests/Micro.Translations.IntegrationTests.csproj @@ -9,20 +9,16 @@ - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Users.Domain.UnitTests/Micro.Users.Domain.UnitTests.csproj b/tests/Micro.Users.Domain.UnitTests/Micro.Users.Domain.UnitTests.csproj index a632b2db..29e0e493 100644 --- a/tests/Micro.Users.Domain.UnitTests/Micro.Users.Domain.UnitTests.csproj +++ b/tests/Micro.Users.Domain.UnitTests/Micro.Users.Domain.UnitTests.csproj @@ -11,15 +11,11 @@ - - - all - runtime; build; native; contentfiles; analyzers - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Users.IntegrationTests/Fixtures/ServiceFixtureCollection.cs b/tests/Micro.Users.IntegrationTests/Fixtures/ServiceFixtureCollection.cs index 4eab5da8..90d78ae0 100644 --- a/tests/Micro.Users.IntegrationTests/Fixtures/ServiceFixtureCollection.cs +++ b/tests/Micro.Users.IntegrationTests/Fixtures/ServiceFixtureCollection.cs @@ -1,6 +1,4 @@ namespace Micro.Users.IntegrationTests.Fixtures; [CollectionDefinition(nameof(ServiceFixtureCollection))] -public class ServiceFixtureCollection : ICollectionFixture -{ -} \ No newline at end of file +public class ServiceFixtureCollection : ICollectionFixture; \ No newline at end of file diff --git a/tests/Micro.Users.IntegrationTests/Micro.Users.IntegrationTests.csproj b/tests/Micro.Users.IntegrationTests/Micro.Users.IntegrationTests.csproj index 77451bc1..6dea0d3d 100644 --- a/tests/Micro.Users.IntegrationTests/Micro.Users.IntegrationTests.csproj +++ b/tests/Micro.Users.IntegrationTests/Micro.Users.IntegrationTests.csproj @@ -9,20 +9,16 @@ true - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Micro.Web.AcceptanceTests/Dockerfile b/tests/Micro.Web.AcceptanceTests/Dockerfile index 2a624e70..da7788d0 100644 --- a/tests/Micro.Web.AcceptanceTests/Dockerfile +++ b/tests/Micro.Web.AcceptanceTests/Dockerfile @@ -15,7 +15,8 @@ FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN dotnet publish "Micro.Web.AcceptanceTests.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false -FROM mcr.microsoft.com/playwright/dotnet:v1.44.0-jammy AS final +FROM mcr.microsoft.com/playwright/dotnet:v1.49.0-jammy AS final WORKDIR /app COPY --from=publish /app/publish . +RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir /usr/share/dotnet --channel 9.0 ENTRYPOINT ["dotnet", "Micro.Web.AcceptanceTests.dll"] diff --git a/tests/Micro.Web.AcceptanceTests/Micro.Web.AcceptanceTests.csproj b/tests/Micro.Web.AcceptanceTests/Micro.Web.AcceptanceTests.csproj index c55f3495..6b3da7fb 100644 --- a/tests/Micro.Web.AcceptanceTests/Micro.Web.AcceptanceTests.csproj +++ b/tests/Micro.Web.AcceptanceTests/Micro.Web.AcceptanceTests.csproj @@ -10,20 +10,16 @@ - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - + + + + + + + + - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -31,7 +27,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/tests/Micro.Web.AcceptanceTests/Pages/Layouts/OrganisationPageLayout.cs b/tests/Micro.Web.AcceptanceTests/Pages/Layouts/OrganisationPageLayout.cs index 3d0e588a..9761f8f9 100644 --- a/tests/Micro.Web.AcceptanceTests/Pages/Layouts/OrganisationPageLayout.cs +++ b/tests/Micro.Web.AcceptanceTests/Pages/Layouts/OrganisationPageLayout.cs @@ -1,5 +1,3 @@ namespace Micro.Web.AcceptanceTests.Pages.Layouts; -public class OrganisationPageLayout(IPage page) : PageLayout(page) -{ -} \ No newline at end of file +public class OrganisationPageLayout(IPage page) : PageLayout(page); \ No newline at end of file diff --git a/tests/Micro.Web.AcceptanceTests/Pages/Layouts/ProjectPageLayout.cs b/tests/Micro.Web.AcceptanceTests/Pages/Layouts/ProjectPageLayout.cs index c71cd9e8..f42b5fef 100644 --- a/tests/Micro.Web.AcceptanceTests/Pages/Layouts/ProjectPageLayout.cs +++ b/tests/Micro.Web.AcceptanceTests/Pages/Layouts/ProjectPageLayout.cs @@ -1,5 +1,3 @@ namespace Micro.Web.AcceptanceTests.Pages.Layouts; -public class ProjectPageLayout(IPage page) : PageLayout(page) -{ -} \ No newline at end of file +public class ProjectPageLayout(IPage page) : PageLayout(page); \ No newline at end of file diff --git a/tests/Micro.Web.AcceptanceTests/Pages/TestExtensions.cs b/tests/Micro.Web.AcceptanceTests/Pages/TestExtensions.cs deleted file mode 100644 index 49775051..00000000 --- a/tests/Micro.Web.AcceptanceTests/Pages/TestExtensions.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Micro.Web.AcceptanceTests.Pages; - -public static class TestExtensions -{ -} \ No newline at end of file