diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4489a5a..f79275a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,7 +30,7 @@ jobs:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
- run: dotnet restore SchoolAccount.ApiTemplate.slnx
+ run: dotnet restore SchoolAccount.CollectAPI.slnx
- name: Check formatting
run: |
@@ -38,10 +38,10 @@ jobs:
dotnet csharpier check .
- name: Build
- run: dotnet build SchoolAccount.ApiTemplate.slnx --configuration Release --no-restore
+ run: dotnet build SchoolAccount.CollectAPI.slnx --configuration Release --no-restore
- name: Test
- run: dotnet test SchoolAccount.ApiTemplate.slnx --configuration Release --no-restore --no-build -- --report-trx --coverage --coverage-output-format cobertura --coverage-settings ${{ github.workspace }}/coverage.config
+ run: dotnet test SchoolAccount.CollectAPI.slnx --configuration Release --no-restore --no-build -- --report-trx --coverage --coverage-output-format cobertura --coverage-settings ${{ github.workspace }}/coverage.config
- name: Test report
uses: EnricoMi/publish-unit-test-result-action@v2
@@ -69,4 +69,4 @@ jobs:
path: TestResults/Merged/SummaryGithub.md
- name: Publish
- run: dotnet publish SchoolAccount.ApiTemplate.slnx --configuration Release --no-restore --no-build
+ run: dotnet publish SchoolAccount.CollectAPI.slnx --configuration Release --no-restore --no-build
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/.name b/.idea/.idea.SchoolAccount.ApiTemplate/.idea/.name
deleted file mode 100644
index 40960a2..0000000
--- a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-SchoolAccount.ApiTemplate
\ No newline at end of file
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/.gitignore b/.idea/.idea.SchoolAccount.CollectAPI/.idea/.gitignore
similarity index 100%
rename from .idea/.idea.SchoolAccount.ApiTemplate/.idea/.gitignore
rename to .idea/.idea.SchoolAccount.CollectAPI/.idea/.gitignore
diff --git a/.idea/.idea.SchoolAccount.CollectAPI/.idea/.name b/.idea/.idea.SchoolAccount.CollectAPI/.idea/.name
new file mode 100644
index 0000000..e01646b
--- /dev/null
+++ b/.idea/.idea.SchoolAccount.CollectAPI/.idea/.name
@@ -0,0 +1 @@
+SchoolAccount.CollectAPI
\ No newline at end of file
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/db-forest-config.xml b/.idea/.idea.SchoolAccount.CollectAPI/.idea/db-forest-config.xml
similarity index 100%
rename from .idea/.idea.SchoolAccount.ApiTemplate/.idea/db-forest-config.xml
rename to .idea/.idea.SchoolAccount.CollectAPI/.idea/db-forest-config.xml
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/encodings.xml b/.idea/.idea.SchoolAccount.CollectAPI/.idea/encodings.xml
similarity index 100%
rename from .idea/.idea.SchoolAccount.ApiTemplate/.idea/encodings.xml
rename to .idea/.idea.SchoolAccount.CollectAPI/.idea/encodings.xml
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/indexLayout.xml b/.idea/.idea.SchoolAccount.CollectAPI/.idea/indexLayout.xml
similarity index 100%
rename from .idea/.idea.SchoolAccount.ApiTemplate/.idea/indexLayout.xml
rename to .idea/.idea.SchoolAccount.CollectAPI/.idea/indexLayout.xml
diff --git a/.idea/.idea.SchoolAccount.ApiTemplate/.idea/vcs.xml b/.idea/.idea.SchoolAccount.CollectAPI/.idea/vcs.xml
similarity index 100%
rename from .idea/.idea.SchoolAccount.ApiTemplate/.idea/vcs.xml
rename to .idea/.idea.SchoolAccount.CollectAPI/.idea/vcs.xml
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 5e0ee44..4c60032 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -16,13 +16,13 @@
-
+
-
+
diff --git a/README.md b/README.md
index 4cba164..bf637d5 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,8 @@
# Introduction
-SchoolAccount-ApiTemplate is a template for building ASP.NET Core Web APIs for the DfE School Account service. It
+SchoolAccount-CollectAPI is an API for the DfE School Account service built on .NET 10 based on this [Api-Template](https://github.com/DFE-Digital/SchoolAccount-ApiTemplate). It
provides a minimal clean architecture solution, with CQRS abstractions, structured logging, error handling, and
-architecture tests already wired up, so new backend services can start from a consistent, proven baseline rather than
-from scratch.
+architecture tests.
## Documentation
@@ -44,23 +43,26 @@ Follow these steps to start the API locally.
3. Run the API using one of the following:
- | Method | Command | Outcome |
- |----------------|--------------------------------------------------|----------------------------------------------------------------------|
- | Docker Compose | `docker compose up --build` | Starts the API and its dependencies (Seq) in containers |
- | .NET CLI | `dotnet run --project src/SchoolAccount.Web.Api` | Runs the API directly using the `http` launch profile, no containers |
+ | Method | Command | Outcome |
+ |----------------|------------------------------------------------------|----------------------------------------------------------------------|
+ | Docker Compose | `docker compose up --build` | Starts the API and its dependencies (Seq) in containers |
+ | .NET CLI | `dotnet run --project src/SchoolAccount.Collect.Api` | Runs the API directly using the `http` launch profile, no containers |
In Rider or Visual Studio you can use the equivalent `docker-compose` or `http` run configurations from the toolbar.
-4. Once running, the API is available at `http://localhost:5100`:
- - Interactive API reference (Scalar) at `http://localhost:5100/scalar/v1`
- - Health checks at `http://localhost:5100/health`
+**Note**: When running the application the messages `No action descriptors found.` may appear. This is a common message
+for minimal APIs due to ASP.NET Core not being able to register controllers/endpoints.
+
+4. Once running, the API is available at `http://localhost:5101`:
+ - Interactive API reference (Scalar) at `http://localhost:5101/scalar/v1`
+ - Health checks at `http://localhost:5101/health`
- Logs (if started with compose) at `http://localhost:8081`
> The Scalar API reference is only mapped in the `Development` environment.
5. Debugging guidance:
- Set breakpoints in your C# files under `src/` and start either run configuration with debugging enabled.
- - `.http` files alongside the endpoints in `src/SchoolAccount.Web.Api/Endpoints` can be used to exercise the API from your IDE.
+ - `.http` files alongside the endpoints in `src/SchoolAccount.Collect.Api/Endpoints` can be used to exercise the API from your IDE.
# Build and Test
@@ -78,7 +80,7 @@ Use the .NET CLI to build or test the solution.
dotnet test
```
-Architecture tests under `tests/SchoolAccount.ArchitectureTests` enforce the clean architecture dependency rules between layers.
+Architecture tests under `tests/SchoolAccount.Collect.ArchitectureTests` enforce the clean architecture dependency rules between layers.
### Formatting
@@ -133,13 +135,13 @@ finishes:
The solution follows a clean architecture pattern with vertical slice features:
-| Project | Purpose |
-|--------------------------------|--------------------------------------------------------------|
-| `SchoolAccount.Web.Api` | ASP.NET Core Web API - endpoints, middleware, error handling |
-| `SchoolAccount.Application` | CQRS handlers and feature logic, organised by feature folder |
-| `SchoolAccount.Domain` | Domain entities and business rules |
-| `SchoolAccount.Infrastructure` | External concerns - time, data access, integrations |
-| `SchoolAccount.SharedKernel` | Shared primitives - `Result`, `Error`, `ValidationError` |
+| Project | Purpose |
+|----------------------------------------|--------------------------------------------------------------|
+| `SchoolAccount.Collect.Api` | ASP.NET Core Web API - endpoints, middleware, error handling |
+| `SchoolAccount.Collect.Application` | CQRS handlers and feature logic, organised by feature folder |
+| `SchoolAccount.Collect.Domain` | Domain entities and business rules |
+| `SchoolAccount.Collect.Infrastructure` | External concerns - time, data access, integrations |
+| `SchoolAccount.Collect.SharedKernel` | Shared primitives - `Result`, `Error`, `ValidationError` |
Each endpoint implements `IEndpoint` and is discovered and mapped automatically at startup. See
[Structure the solution using clean architecture](decisions/0002-use-clean-architecture.md) for the dependency rules.
@@ -152,5 +154,5 @@ is available at http://localhost:8081.
## Contributing
1. Branch from `main` using the convention `task/` or `feature/`.
-2. Open a [pull request](https://github.com/DFE-Digital/SchoolAccount-ApiTemplate/pulls) against `main`.
+2. Open a [pull request](https://github.com/DFE-Digital/SchoolAccount-CollectAPI/pulls) against `main`.
3. The [build workflow](.github/workflows/build.yml) must pass before merging.
diff --git a/SchoolAccount.ApiTemplate.sln.DotSettings b/SchoolAccount.CollectAPI.sln.DotSettings
similarity index 100%
rename from SchoolAccount.ApiTemplate.sln.DotSettings
rename to SchoolAccount.CollectAPI.sln.DotSettings
diff --git a/SchoolAccount.ApiTemplate.slnx b/SchoolAccount.CollectAPI.slnx
similarity index 59%
rename from SchoolAccount.ApiTemplate.slnx
rename to SchoolAccount.CollectAPI.slnx
index 437c580..0048fb6 100644
--- a/SchoolAccount.ApiTemplate.slnx
+++ b/SchoolAccount.CollectAPI.slnx
@@ -25,15 +25,15 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
diff --git a/decisions/0002-use-clean-architecture.md b/decisions/0002-use-clean-architecture.md
index b9d8800..24389a9 100644
--- a/decisions/0002-use-clean-architecture.md
+++ b/decisions/0002-use-clean-architecture.md
@@ -40,17 +40,17 @@ can be enforced mechanically at the assembly level.
The solution is split into five projects, with all dependencies pointing
inward:
-* `SchoolAccount.SharedKernel` - base building blocks (`Result`, `Error`) with no dependencies.
-* `SchoolAccount.Domain` - entities and business rules; depends only on `SchoolAccount.SharedKernel`.
-* `SchoolAccount.Application` - command/query handlers for each use case, implementing
+* `SchoolAccount.Collect.SharedKernel` - base building blocks (`Result`, `Error`) with no dependencies.
+* `SchoolAccount.Collect.Domain` - entities and business rules; depends only on `SchoolAccount.Collect.SharedKernel`.
+* `SchoolAccount.Collect.Application` - command/query handlers for each use case, implementing
`ICommandHandler`/`IQueryHandler` interfaces. Handlers are decorated with cross-cutting
- concerns such as validation and logging. Depends on `SchoolAccount.Domain` and
- `SchoolAccount.SharedKernel`.
-* `SchoolAccount.Infrastructure` - EF Core/PostgreSQL persistence, authentication, time -
+ concerns such as validation and logging. Depends on `SchoolAccount.Collect.Domain` and
+ `SchoolAccount.Collect.SharedKernel`.
+* `SchoolAccount.Collect.Infrastructure` - EF Core/PostgreSQL persistence, authentication, time -
implementations of abstractions the inner layers define; depends on
- `SchoolAccount.Application`.
-* `SchoolAccount.Web.Api` - minimal API endpoints and composition root; references
- `SchoolAccount.Infrastructure` only to wire dependency injection.
+ `SchoolAccount.Collect.Application`.
+* `SchoolAccount.Collect.Api` - minimal API endpoints and composition root; references
+ `SchoolAccount.Collect.Infrastructure` only to wire dependency injection.
### Consequences
@@ -66,9 +66,9 @@ inward:
### Confirmation
-`tests/SchoolAccount.ArchitectureTests` encodes the dependency rules with NetArchTest (e.g.
-`SchoolAccount.Domain` must not depend on `SchoolAccount.Application`,
-`SchoolAccount.Application` must not depend on `SchoolAccount.Infrastructure`). These tests run in the
+`tests/SchoolAccount.Collect.ArchitectureTests` encodes the dependency rules with NetArchTest (e.g.
+`SchoolAccount.Collect.Domain` must not depend on `SchoolAccount.Collect.Application`,
+`SchoolAccount.Collect.Application` must not depend on `SchoolAccount.Collect.Infrastructure`). These tests run in the
`Build` workflow on every pull request, so a violating change cannot merge cleanly.
## More Information
diff --git a/decisions/0007-validate-requests-with-data-annotations.md b/decisions/0007-validate-requests-with-data-annotations.md
index ff44aa0..4f42aee 100644
--- a/decisions/0007-validate-requests-with-data-annotations.md
+++ b/decisions/0007-validate-requests-with-data-annotations.md
@@ -55,9 +55,9 @@ Core validates them automatically before the endpoint delegate runs, with no dec
validator class needed for what is usually a handful of attributes.
`services.AddValidation()` in
-[SchoolAccount.Web.Api/DependencyInjection.cs](../src/SchoolAccount.Web.Api/DependencyInjection.cs) wires
+[SchoolAccount.Collect.Api/DependencyInjection.cs](../src/SchoolAccount.Collect.Api/DependencyInjection.cs) wires
up ASP.NET Core's built-in minimal API validation. `GetByLaestabRequest.Laestab` in
-[GetByLaestabRequest.cs](../src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs)
+[GetByLaestabRequest.cs](../src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs)
carries a `[RegularExpression]` attribute as the example. A malformed value never reaches
`GetOrganisationByLaestabQueryHandler`; the endpoint's `.ProducesValidationProblem()` documents the
response the client gets instead.
@@ -87,14 +87,14 @@ up front.
anything needing other data (a database lookup, a cross-field business rule) has no attribute to
express it and must be checked inside the handler instead.
* Neutral, because `FluentValidation.DependencyInjectionExtensions` remains referenced in
- [SchoolAccount.Application.csproj](../src/SchoolAccount.Application/SchoolAccount.Application.csproj)
+ [SchoolAccount.Collect.Application.csproj](../src/SchoolAccount.Collect.Application/SchoolAccount.Collect.Application.csproj)
for that case. Nothing currently
uses it; if a query or command needs it, wrap that specific handler the way `LoggingDecorator`
does, rather than making FluentValidation the default for every handler.
### Confirmation
-[GetByLaestabTests.cs](../tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs)
+[GetByLaestabTests.cs](../tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs)
exercises the endpoint with a malformed LAESTAB value and asserts the validation problem response,
confirming the request never reaches the query handler.
diff --git a/docker-compose.override.yml b/docker-compose.override.yml
index 4567355..97eab40 100644
--- a/docker-compose.override.yml
+++ b/docker-compose.override.yml
@@ -1,5 +1,5 @@
services:
- web-api:
+ collect-api:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
diff --git a/docker-compose.yml b/docker-compose.yml
index 44dc3fc..c9169c2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,12 +1,12 @@
services:
- web-api:
- image: ${DOCKER_REGISTRY-}webapi
- container_name: web-api
+ collect-api:
+ image: ${DOCKER_REGISTRY-}collectapi
+ container_name: collect-api
build:
context: .
- dockerfile: src/SchoolAccount.Web.Api/Dockerfile
+ dockerfile: src/SchoolAccount.Collect.Api/Dockerfile
ports:
- - "5100:8080"
+ - "5101:8080"
seq:
image: datalust/seq:2024.3
diff --git a/docs/clean-architecture.md b/docs/clean-architecture.md
index 959f913..14147dd 100644
--- a/docs/clean-architecture.md
+++ b/docs/clean-architecture.md
@@ -83,7 +83,7 @@ Infrastructure depends on both Domain and Application but is never referenced by
### 4. Presentation
-The entry point to the system - the Web API project. In this solution that is `SchoolAccount.Web.Api`.
+The entry point to the system - the Web API project. In this solution that is `SchoolAccount.Collect.Api`.
Contains:
- **Endpoints** - thin wrappers implementing `IEndpoint` that dispatch Commands and Queries
@@ -105,7 +105,7 @@ Domain ← Application ← Infrastructure
The arrows show the direction of **allowed** dependencies. No arrow ever points toward Infrastructure from the inner layers.
-These rules are enforced by the tests in `tests/SchoolAccount.ArchitectureTests`.
+These rules are enforced by the tests in `tests/SchoolAccount.Collect.ArchitectureTests`.
---
@@ -113,17 +113,17 @@ These rules are enforced by the tests in `tests/SchoolAccount.ArchitectureTests`
| Layer | Project |
|----------------|--------------------------------|
-| Domain | `SchoolAccount.Domain` |
-| Application | `SchoolAccount.Application` |
-| Infrastructure | `SchoolAccount.Infrastructure` |
-| Presentation | `SchoolAccount.Web.Api` |
-| Shared kernel | `SchoolAccount.SharedKernel` |
+| Domain | `SchoolAccount.Collect.Domain` |
+| Application | `SchoolAccount.Collect.Application` |
+| Infrastructure | `SchoolAccount.Collect.Infrastructure` |
+| Presentation | `SchoolAccount.Collect.Api` |
+| Shared kernel | `SchoolAccount.Collect.SharedKernel` |
-`SchoolAccount.SharedKernel` contains primitives used across all layers (`Result`, `Error`, `ValidationError`,
+`SchoolAccount.Collect.SharedKernel` contains primitives used across all layers (`Result`, `Error`, `ValidationError`,
`IDateTimeProvider`) and sits outside the ring model - it has no dependencies itself and can be referenced by any
layer.
-The Application layer organises features using **package by feature** under `src/SchoolAccount.Application/`,
+The Application layer organises features using **package by feature** under `src/SchoolAccount.Collect.Application/`,
with each use case in its own folder.
---
diff --git a/docs/integration-testing.md b/docs/integration-testing.md
index abdd852..c8bb4c6 100644
--- a/docs/integration-testing.md
+++ b/docs/integration-testing.md
@@ -11,7 +11,7 @@ Narrow integration testing ensures the stack is wired up correctly prior to runn
While targeted at MVC sites, the [Integration Testing in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-10.0&pivots=xunit) guide provides a good overview of the approach used in this project.
-Rather than starting a web server and sending HTTP requests from a separate process the tests leverage the [WebApplicationFactory](https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-10.0&pivots=xunit#basic-tests-with-the-default-webapplicationfactory) to host the API in-process by extending the API's [Program.cs](../src/SchoolAccount.Web.Api/Program.cs).
+Rather than starting a web server and sending HTTP requests from a separate process the tests leverage the [WebApplicationFactory](https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-10.0&pivots=xunit#basic-tests-with-the-default-webapplicationfactory) to host the API in-process by extending the API's [Program.cs](../src/SchoolAccount.Collect.Api/Program.cs).
This allows the tests to send HTTP requests directly to the API without the overhead of starting a separate process allowing tests run faster in an isolated fashion.
@@ -30,7 +30,7 @@ var client = _factory.WithWebHostBuilder(builder =>
For more advanced scenarios a [Custom WebApplicationFactory](https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-10.0&pivots=xunit#customize-webapplicationfactory) may be created to provide common defaults across tests and reduce boilerplate setup.
-The [SchoolAccount.Web.Api.IntegrationTests](../tests/SchoolAccount.Web.Api.IntegrationTests) project contains 'narrow' integration tests for the API endpoints.
+The [SchoolAccount.Collect.Api.IntegrationTests](../tests/SchoolAccount.Collect.Api.IntegrationTests) project contains 'narrow' integration tests for the API endpoints.
Due to the simplicity of the example API the default WebApplicationFactory is sufficient, however the project demonstrates use of `ConfigureTestServices` to replace the handler with a test implementation.
diff --git a/docs/open-api-documentation.md b/docs/open-api-documentation.md
index 93763a7..d98c433 100644
--- a/docs/open-api-documentation.md
+++ b/docs/open-api-documentation.md
@@ -33,7 +33,7 @@ The information will be displayed in the Scalar UI and in the Open API documenta
Annotations on request classes can be used to provide descriptions of individual parameters.
-An example can be seen in [GetByLaestabRequest](../src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs) which is annotated with a description for the `Laestab` property.
+An example can be seen in [GetByLaestabRequest](../src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs) which is annotated with a description for the `Laestab` property.
```csharp
[Description("LAESTAB of the organisation. Must be a seven digit number.")]
@@ -44,7 +44,7 @@ An example can be seen in [GetByLaestabRequest](../src/SchoolAccount.Web.Api/End
The `Produces` extension method can be used to specify the response type and status code for an endpoint, i.e. `.Produces()`.
-The specified type can be annotated in the same way as annotating a request in the previous section. See [OrganisationResponse](../src/SchoolAccount.Application/Organisations/GetByLaestab/OrganisationResponse.cs) for an example of annotating a response type with descriptions.
+The specified type can be annotated in the same way as annotating a request in the previous section. See [OrganisationResponse](../src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/OrganisationResponse.cs) for an example of annotating a response type with descriptions.
Specific problem responses codes can be documented using the `ProducesProblem` extension method. The method should be used to specify each HTTP response code that can be returned from an endpoint. The below snippet shows an example of documenting that the API may throw a 500 error.
@@ -58,7 +58,7 @@ For validation errors the specfic `ProducesValidationProblem` extenstion method
## Example of documented endpoint
-All the recommendations above can be found on the `GetByLaestab` endpoint in the [GetByLaestabEndpoint](../src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs) endpoint.
+All the recommendations above can be found on the `GetByLaestab` endpoint in the [GetByLaestabEndpoint](../src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs) endpoint.
```csharp
app.MapGet("/organisations/{laestab}", GetByLaestab)
diff --git a/src/SchoolAccount.Application/Abstractions/Messaging/ICommand.cs b/src/SchoolAccount.Application/Abstractions/Messaging/ICommand.cs
deleted file mode 100644
index 3e607bd..0000000
--- a/src/SchoolAccount.Application/Abstractions/Messaging/ICommand.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace SchoolAccount.Application.Abstractions.Messaging;
-
-public interface ICommand;
-
-public interface ICommand;
diff --git a/src/SchoolAccount.Application/Abstractions/Messaging/IQuery.cs b/src/SchoolAccount.Application/Abstractions/Messaging/IQuery.cs
deleted file mode 100644
index dea824a..0000000
--- a/src/SchoolAccount.Application/Abstractions/Messaging/IQuery.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-namespace SchoolAccount.Application.Abstractions.Messaging;
-
-public interface IQuery;
diff --git a/src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs b/src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs
deleted file mode 100644
index 7b50ddd..0000000
--- a/src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using SchoolAccount.Application.Abstractions.Messaging;
-
-namespace SchoolAccount.Application.Organisations.GetByLaestab;
-
-public sealed record GetOrganisationByLaestabQuery(string laestab) : IQuery;
diff --git a/src/SchoolAccount.Web.Api/DependencyInjection.cs b/src/SchoolAccount.Collect.Api/DependencyInjection.cs
similarity index 88%
rename from src/SchoolAccount.Web.Api/DependencyInjection.cs
rename to src/SchoolAccount.Collect.Api/DependencyInjection.cs
index 6e262e2..85c1bab 100644
--- a/src/SchoolAccount.Web.Api/DependencyInjection.cs
+++ b/src/SchoolAccount.Collect.Api/DependencyInjection.cs
@@ -1,7 +1,7 @@
using System.Text.Json.Serialization;
-using SchoolAccount.Web.Api.Infrastructure;
+using SchoolAccount.Collect.Api.Infrastructure;
-namespace SchoolAccount.Web.Api;
+namespace SchoolAccount.Collect.Api;
public static class DependencyInjection
{
diff --git a/src/SchoolAccount.Collect.Api/Dockerfile b/src/SchoolAccount.Collect.Api/Dockerfile
new file mode 100644
index 0000000..60db6b4
--- /dev/null
+++ b/src/SchoolAccount.Collect.Api/Dockerfile
@@ -0,0 +1,35 @@
+# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+# This stage is used when running from VS in fast mode (Default for Debug configuration)
+FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
+USER $APP_UID
+WORKDIR /app
+EXPOSE 8080
+
+
+# This stage is used to build the service project
+FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
+ARG BUILD_CONFIGURATION=Release
+WORKDIR /src
+COPY ["Directory.Packages.props", "."]
+COPY ["Directory.Build.props", "."]
+COPY ["src/SchoolAccount.Collect.Api/SchoolAccount.Collect.Api.csproj", "src/SchoolAccount.Collect.Api/"]
+COPY ["src/SchoolAccount.Collect.Infrastructure/SchoolAccount.Collect.Infrastructure.csproj", "src/SchoolAccount.Collect.Infrastructure/"]
+COPY ["src/SchoolAccount.Collect.Application/SchoolAccount.Collect.Application.csproj", "src/SchoolAccount.Collect.Application/"]
+COPY ["src/SchoolAccount.Collect.Domain/SchoolAccount.Collect.Domain.csproj", "src/SchoolAccount.Collect.Domain/"]
+COPY ["src/SchoolAccount.Collect.SharedKernel/SchoolAccount.Collect.SharedKernel.csproj", "src/SchoolAccount.Collect.SharedKernel/"]
+RUN dotnet restore "./src/SchoolAccount.Collect.Api/SchoolAccount.Collect.Api.csproj"
+COPY . .
+WORKDIR "/src/src/SchoolAccount.Collect.Api"
+RUN dotnet build "./SchoolAccount.Collect.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
+
+# This stage is used to publish the service project to be copied to the final stage
+FROM build AS publish
+ARG BUILD_CONFIGURATION=Release
+RUN dotnet publish "./SchoolAccount.Collect.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
+
+# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "SchoolAccount.Collect.Api.dll"]
\ No newline at end of file
diff --git a/src/SchoolAccount.Web.Api/Endpoints/IEndpoint.cs b/src/SchoolAccount.Collect.Api/Endpoints/IEndpoint.cs
similarity index 61%
rename from src/SchoolAccount.Web.Api/Endpoints/IEndpoint.cs
rename to src/SchoolAccount.Collect.Api/Endpoints/IEndpoint.cs
index 7df7dca..6cf0333 100644
--- a/src/SchoolAccount.Web.Api/Endpoints/IEndpoint.cs
+++ b/src/SchoolAccount.Collect.Api/Endpoints/IEndpoint.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.Web.Api.Endpoints;
+namespace SchoolAccount.Collect.Api.Endpoints;
public interface IEndpoint
{
diff --git a/src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs
similarity index 80%
rename from src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs
rename to src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs
index f5e879c..552491f 100644
--- a/src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs
+++ b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs
@@ -1,11 +1,11 @@
using System.Diagnostics.CodeAnalysis;
-using SchoolAccount.Application.Abstractions.Messaging;
-using SchoolAccount.Application.Organisations.GetByLaestab;
-using SchoolAccount.SharedKernel;
-using SchoolAccount.Web.Api.Extensions;
-using SchoolAccount.Web.Api.Infrastructure;
+using SchoolAccount.Collect.Api.Extensions;
+using SchoolAccount.Collect.Api.Infrastructure;
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
+using SchoolAccount.Collect.Application.Organisations.GetByLaestab;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Web.Api.Endpoints.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Api.Endpoints.Organisations.GetByLaestab;
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.AllConstructors)]
internal sealed class GetByLaestabEndpoint : IEndpoint
diff --git a/src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs
similarity index 85%
rename from src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs
rename to src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs
index 2c74790..264d96a 100644
--- a/src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs
+++ b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabRequest.cs
@@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
-namespace SchoolAccount.Web.Api.Endpoints.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Api.Endpoints.Organisations.GetByLaestab;
public sealed record GetByLaestabRequest
{
diff --git a/src/SchoolAccount.Web.Api/Endpoints/Organisations/organisations.http b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/organisations.http
similarity index 86%
rename from src/SchoolAccount.Web.Api/Endpoints/Organisations/organisations.http
rename to src/SchoolAccount.Collect.Api/Endpoints/Organisations/organisations.http
index 4971e1d..2762700 100644
--- a/src/SchoolAccount.Web.Api/Endpoints/Organisations/organisations.http
+++ b/src/SchoolAccount.Collect.Api/Endpoints/Organisations/organisations.http
@@ -1,4 +1,4 @@
-@API_HostAddress = http://localhost:5100
+@API_HostAddress = http://localhost:5101
### Get organisation with 7-digit laestab (expected 200)
GET {{API_HostAddress}}/organisations/1234567
diff --git a/src/SchoolAccount.Web.Api/Endpoints/Tags.cs b/src/SchoolAccount.Collect.Api/Endpoints/Tags.cs
similarity index 63%
rename from src/SchoolAccount.Web.Api/Endpoints/Tags.cs
rename to src/SchoolAccount.Collect.Api/Endpoints/Tags.cs
index dfd4d0a..1b0cc9c 100644
--- a/src/SchoolAccount.Web.Api/Endpoints/Tags.cs
+++ b/src/SchoolAccount.Collect.Api/Endpoints/Tags.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.Web.Api.Endpoints;
+namespace SchoolAccount.Collect.Api.Endpoints;
public static class Tags
{
diff --git a/src/SchoolAccount.Web.Api/Extensions/EndpointExtensions.cs b/src/SchoolAccount.Collect.Api/Extensions/EndpointExtensions.cs
similarity index 92%
rename from src/SchoolAccount.Web.Api/Extensions/EndpointExtensions.cs
rename to src/SchoolAccount.Collect.Api/Extensions/EndpointExtensions.cs
index 88e4b63..e2cf407 100644
--- a/src/SchoolAccount.Web.Api/Extensions/EndpointExtensions.cs
+++ b/src/SchoolAccount.Collect.Api/Extensions/EndpointExtensions.cs
@@ -1,8 +1,8 @@
using System.Reflection;
using Microsoft.Extensions.DependencyInjection.Extensions;
-using SchoolAccount.Web.Api.Endpoints;
+using SchoolAccount.Collect.Api.Endpoints;
-namespace SchoolAccount.Web.Api.Extensions;
+namespace SchoolAccount.Collect.Api.Extensions;
public static class EndpointExtensions
{
diff --git a/src/SchoolAccount.Web.Api/Extensions/MiddlewareExtensions.cs b/src/SchoolAccount.Collect.Api/Extensions/MiddlewareExtensions.cs
similarity index 71%
rename from src/SchoolAccount.Web.Api/Extensions/MiddlewareExtensions.cs
rename to src/SchoolAccount.Collect.Api/Extensions/MiddlewareExtensions.cs
index cf74f14..1504346 100644
--- a/src/SchoolAccount.Web.Api/Extensions/MiddlewareExtensions.cs
+++ b/src/SchoolAccount.Collect.Api/Extensions/MiddlewareExtensions.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.Web.Api.Middleware;
+using SchoolAccount.Collect.Api.Middleware;
-namespace SchoolAccount.Web.Api.Extensions;
+namespace SchoolAccount.Collect.Api.Extensions;
public static class MiddlewareExtensions
{
diff --git a/src/SchoolAccount.Web.Api/Extensions/ResultExtensions.cs b/src/SchoolAccount.Collect.Api/Extensions/ResultExtensions.cs
similarity index 84%
rename from src/SchoolAccount.Web.Api/Extensions/ResultExtensions.cs
rename to src/SchoolAccount.Collect.Api/Extensions/ResultExtensions.cs
index f0118cc..a190d22 100644
--- a/src/SchoolAccount.Web.Api/Extensions/ResultExtensions.cs
+++ b/src/SchoolAccount.Collect.Api/Extensions/ResultExtensions.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Web.Api.Extensions;
+namespace SchoolAccount.Collect.Api.Extensions;
public static class ResultExtensions
{
diff --git a/src/SchoolAccount.Web.Api/Infrastructure/CustomResults.cs b/src/SchoolAccount.Collect.Api/Infrastructure/CustomResults.cs
similarity index 96%
rename from src/SchoolAccount.Web.Api/Infrastructure/CustomResults.cs
rename to src/SchoolAccount.Collect.Api/Infrastructure/CustomResults.cs
index 7e72ec7..67f9ac5 100644
--- a/src/SchoolAccount.Web.Api/Infrastructure/CustomResults.cs
+++ b/src/SchoolAccount.Collect.Api/Infrastructure/CustomResults.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Web.Api.Infrastructure;
+namespace SchoolAccount.Collect.Api.Infrastructure;
public static class CustomResults
{
diff --git a/src/SchoolAccount.Web.Api/Infrastructure/GlobalExceptionHandler.cs b/src/SchoolAccount.Collect.Api/Infrastructure/GlobalExceptionHandler.cs
similarity index 94%
rename from src/SchoolAccount.Web.Api/Infrastructure/GlobalExceptionHandler.cs
rename to src/SchoolAccount.Collect.Api/Infrastructure/GlobalExceptionHandler.cs
index edadd91..446d913 100644
--- a/src/SchoolAccount.Web.Api/Infrastructure/GlobalExceptionHandler.cs
+++ b/src/SchoolAccount.Collect.Api/Infrastructure/GlobalExceptionHandler.cs
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
-namespace SchoolAccount.Web.Api.Infrastructure;
+namespace SchoolAccount.Collect.Api.Infrastructure;
internal sealed class GlobalExceptionHandler(ILogger logger)
: IExceptionHandler
diff --git a/src/SchoolAccount.Web.Api/Middleware/RequestContextLoggingMiddleware.cs b/src/SchoolAccount.Collect.Api/Middleware/RequestContextLoggingMiddleware.cs
similarity index 93%
rename from src/SchoolAccount.Web.Api/Middleware/RequestContextLoggingMiddleware.cs
rename to src/SchoolAccount.Collect.Api/Middleware/RequestContextLoggingMiddleware.cs
index a3d275a..ce5d5f1 100644
--- a/src/SchoolAccount.Web.Api/Middleware/RequestContextLoggingMiddleware.cs
+++ b/src/SchoolAccount.Collect.Api/Middleware/RequestContextLoggingMiddleware.cs
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Primitives;
using Serilog.Context;
-namespace SchoolAccount.Web.Api.Middleware;
+namespace SchoolAccount.Collect.Api.Middleware;
public class RequestContextLoggingMiddleware(RequestDelegate next)
{
diff --git a/src/SchoolAccount.Web.Api/Program.cs b/src/SchoolAccount.Collect.Api/Program.cs
similarity index 84%
rename from src/SchoolAccount.Web.Api/Program.cs
rename to src/SchoolAccount.Collect.Api/Program.cs
index bf3da91..17b9e23 100644
--- a/src/SchoolAccount.Web.Api/Program.cs
+++ b/src/SchoolAccount.Collect.Api/Program.cs
@@ -3,10 +3,10 @@
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Scalar.AspNetCore;
-using SchoolAccount.Application;
-using SchoolAccount.Infrastructure;
-using SchoolAccount.Web.Api;
-using SchoolAccount.Web.Api.Extensions;
+using SchoolAccount.Collect.Api;
+using SchoolAccount.Collect.Api.Extensions;
+using SchoolAccount.Collect.Application;
+using SchoolAccount.Collect.Infrastructure;
using Serilog;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
diff --git a/src/SchoolAccount.Web.Api/Properties/launchSettings.json b/src/SchoolAccount.Collect.Api/Properties/launchSettings.json
similarity index 86%
rename from src/SchoolAccount.Web.Api/Properties/launchSettings.json
rename to src/SchoolAccount.Collect.Api/Properties/launchSettings.json
index 47ae3e0..9750142 100644
--- a/src/SchoolAccount.Web.Api/Properties/launchSettings.json
+++ b/src/SchoolAccount.Collect.Api/Properties/launchSettings.json
@@ -8,14 +8,14 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
- "applicationUrl": "http://localhost:5100"
+ "applicationUrl": "http://localhost:5101"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/scalar/v1",
"environmentVariables": {
- "ASPNETCORE_HTTP_PORTS": "5100"
+ "ASPNETCORE_HTTP_PORTS": "5101"
},
"publishAllPorts": true,
"useSSL": true
diff --git a/src/SchoolAccount.Web.Api/SchoolAccount.Web.Api.csproj b/src/SchoolAccount.Collect.Api/SchoolAccount.Collect.Api.csproj
similarity index 85%
rename from src/SchoolAccount.Web.Api/SchoolAccount.Web.Api.csproj
rename to src/SchoolAccount.Collect.Api/SchoolAccount.Collect.Api.csproj
index cd9f690..268298d 100644
--- a/src/SchoolAccount.Web.Api/SchoolAccount.Web.Api.csproj
+++ b/src/SchoolAccount.Collect.Api/SchoolAccount.Collect.Api.csproj
@@ -15,6 +15,6 @@
-
+
diff --git a/src/SchoolAccount.Web.Api/appsettings.Development.json b/src/SchoolAccount.Collect.Api/appsettings.Development.json
similarity index 100%
rename from src/SchoolAccount.Web.Api/appsettings.Development.json
rename to src/SchoolAccount.Collect.Api/appsettings.Development.json
diff --git a/src/SchoolAccount.Web.Api/appsettings.json b/src/SchoolAccount.Collect.Api/appsettings.json
similarity index 100%
rename from src/SchoolAccount.Web.Api/appsettings.json
rename to src/SchoolAccount.Collect.Api/appsettings.json
diff --git a/src/SchoolAccount.Application/Abstractions/Behaviors/LoggingDecorator.cs b/src/SchoolAccount.Collect.Application/Abstractions/Behaviors/LoggingDecorator.cs
similarity index 96%
rename from src/SchoolAccount.Application/Abstractions/Behaviors/LoggingDecorator.cs
rename to src/SchoolAccount.Collect.Application/Abstractions/Behaviors/LoggingDecorator.cs
index dca6fa7..882860c 100644
--- a/src/SchoolAccount.Application/Abstractions/Behaviors/LoggingDecorator.cs
+++ b/src/SchoolAccount.Collect.Application/Abstractions/Behaviors/LoggingDecorator.cs
@@ -1,10 +1,10 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Logging;
-using SchoolAccount.Application.Abstractions.Messaging;
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
+using SchoolAccount.Collect.SharedKernel;
using Serilog.Context;
-namespace SchoolAccount.Application.Abstractions.Behaviors;
+namespace SchoolAccount.Collect.Application.Abstractions.Behaviors;
internal static partial class LoggingDecorator
{
diff --git a/src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommand.cs b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommand.cs
new file mode 100644
index 0000000..453c9fa
--- /dev/null
+++ b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommand.cs
@@ -0,0 +1,5 @@
+namespace SchoolAccount.Collect.Application.Abstractions.Messaging;
+
+public interface ICommand;
+
+public interface ICommand;
diff --git a/src/SchoolAccount.Application/Abstractions/Messaging/ICommandHandler.cs b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommandHandler.cs
similarity index 75%
rename from src/SchoolAccount.Application/Abstractions/Messaging/ICommandHandler.cs
rename to src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommandHandler.cs
index 54f8592..f1f4843 100644
--- a/src/SchoolAccount.Application/Abstractions/Messaging/ICommandHandler.cs
+++ b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/ICommandHandler.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Application.Abstractions.Messaging;
+namespace SchoolAccount.Collect.Application.Abstractions.Messaging;
public interface ICommandHandler
where TCommand : ICommand
diff --git a/src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQuery.cs b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQuery.cs
new file mode 100644
index 0000000..4acaa87
--- /dev/null
+++ b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQuery.cs
@@ -0,0 +1,3 @@
+namespace SchoolAccount.Collect.Application.Abstractions.Messaging;
+
+public interface IQuery;
diff --git a/src/SchoolAccount.Application/Abstractions/Messaging/IQueryHandler.cs b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQueryHandler.cs
similarity index 61%
rename from src/SchoolAccount.Application/Abstractions/Messaging/IQueryHandler.cs
rename to src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQueryHandler.cs
index 6c8cbf1..a2e8d43 100644
--- a/src/SchoolAccount.Application/Abstractions/Messaging/IQueryHandler.cs
+++ b/src/SchoolAccount.Collect.Application/Abstractions/Messaging/IQueryHandler.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Application.Abstractions.Messaging;
+namespace SchoolAccount.Collect.Application.Abstractions.Messaging;
public interface IQueryHandler
where TQuery : IQuery
diff --git a/src/SchoolAccount.Application/DependencyInjection.cs b/src/SchoolAccount.Collect.Application/DependencyInjection.cs
similarity index 87%
rename from src/SchoolAccount.Application/DependencyInjection.cs
rename to src/SchoolAccount.Collect.Application/DependencyInjection.cs
index 92f43b2..8271d89 100644
--- a/src/SchoolAccount.Application/DependencyInjection.cs
+++ b/src/SchoolAccount.Collect.Application/DependencyInjection.cs
@@ -1,8 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
-using SchoolAccount.Application.Abstractions.Behaviors;
-using SchoolAccount.Application.Abstractions.Messaging;
+using SchoolAccount.Collect.Application.Abstractions.Behaviors;
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
-namespace SchoolAccount.Application;
+namespace SchoolAccount.Collect.Application;
public static class DependencyInjection
{
diff --git a/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs
new file mode 100644
index 0000000..fc31c17
--- /dev/null
+++ b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQuery.cs
@@ -0,0 +1,5 @@
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
+
+namespace SchoolAccount.Collect.Application.Organisations.GetByLaestab;
+
+public sealed record GetOrganisationByLaestabQuery(string laestab) : IQuery;
diff --git a/src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs
similarity index 83%
rename from src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs
rename to src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs
index 9d7e08e..98617f4 100644
--- a/src/SchoolAccount.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs
+++ b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/GetOrganisationByLaestabQueryHandler.cs
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
-using SchoolAccount.Application.Abstractions.Messaging;
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Application.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Application.Organisations.GetByLaestab;
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.AllConstructors)]
public sealed class GetOrganisationByLaestabQueryHandler(IDateTimeProvider dateTimeProvider)
diff --git a/src/SchoolAccount.Application/Organisations/GetByLaestab/LaestabValue.cs b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/LaestabValue.cs
similarity index 84%
rename from src/SchoolAccount.Application/Organisations/GetByLaestab/LaestabValue.cs
rename to src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/LaestabValue.cs
index e7d4411..327d413 100644
--- a/src/SchoolAccount.Application/Organisations/GetByLaestab/LaestabValue.cs
+++ b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/LaestabValue.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.Application.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Application.Organisations.GetByLaestab;
public class LaestabValue
{
diff --git a/src/SchoolAccount.Application/Organisations/GetByLaestab/OrganisationResponse.cs b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/OrganisationResponse.cs
similarity index 86%
rename from src/SchoolAccount.Application/Organisations/GetByLaestab/OrganisationResponse.cs
rename to src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/OrganisationResponse.cs
index 8c8934b..14547ae 100644
--- a/src/SchoolAccount.Application/Organisations/GetByLaestab/OrganisationResponse.cs
+++ b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/OrganisationResponse.cs
@@ -1,6 +1,6 @@
using System.ComponentModel;
-namespace SchoolAccount.Application.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Application.Organisations.GetByLaestab;
public enum OrgStatus
{
diff --git a/src/SchoolAccount.Application/Organisations/GetByLaestab/StatusCalculator.cs b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/StatusCalculator.cs
similarity index 89%
rename from src/SchoolAccount.Application/Organisations/GetByLaestab/StatusCalculator.cs
rename to src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/StatusCalculator.cs
index 6052431..a7e31a7 100644
--- a/src/SchoolAccount.Application/Organisations/GetByLaestab/StatusCalculator.cs
+++ b/src/SchoolAccount.Collect.Application/Organisations/GetByLaestab/StatusCalculator.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Application.Organisations.GetByLaestab;
+namespace SchoolAccount.Collect.Application.Organisations.GetByLaestab;
public class StatusCalculator(IDateTimeProvider dateTimeProvider)
{
diff --git a/src/SchoolAccount.Application/SchoolAccount.Application.csproj b/src/SchoolAccount.Collect.Application/SchoolAccount.Collect.Application.csproj
similarity index 56%
rename from src/SchoolAccount.Application/SchoolAccount.Application.csproj
rename to src/SchoolAccount.Collect.Application/SchoolAccount.Collect.Application.csproj
index 2652613..c7ffea1 100644
--- a/src/SchoolAccount.Application/SchoolAccount.Application.csproj
+++ b/src/SchoolAccount.Collect.Application/SchoolAccount.Collect.Application.csproj
@@ -7,11 +7,11 @@
-
-
+
+
-
+
diff --git a/src/SchoolAccount.Domain/AssemblyMarker.cs b/src/SchoolAccount.Collect.Domain/AssemblyMarker.cs
similarity index 83%
rename from src/SchoolAccount.Domain/AssemblyMarker.cs
rename to src/SchoolAccount.Collect.Domain/AssemblyMarker.cs
index a182c91..5a1233c 100644
--- a/src/SchoolAccount.Domain/AssemblyMarker.cs
+++ b/src/SchoolAccount.Collect.Domain/AssemblyMarker.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.Domain;
+namespace SchoolAccount.Collect.Domain;
///
/// Marker type used to reference the Domain assembly (e.g. in architecture tests)
diff --git a/src/SchoolAccount.Collect.Domain/SchoolAccount.Collect.Domain.csproj b/src/SchoolAccount.Collect.Domain/SchoolAccount.Collect.Domain.csproj
new file mode 100644
index 0000000..dfbe8bc
--- /dev/null
+++ b/src/SchoolAccount.Collect.Domain/SchoolAccount.Collect.Domain.csproj
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/SchoolAccount.Infrastructure/DependencyInjection.cs b/src/SchoolAccount.Collect.Infrastructure/DependencyInjection.cs
similarity index 77%
rename from src/SchoolAccount.Infrastructure/DependencyInjection.cs
rename to src/SchoolAccount.Collect.Infrastructure/DependencyInjection.cs
index a066025..b0e8d48 100644
--- a/src/SchoolAccount.Infrastructure/DependencyInjection.cs
+++ b/src/SchoolAccount.Collect.Infrastructure/DependencyInjection.cs
@@ -1,8 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
-using SchoolAccount.Infrastructure.Time;
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.Infrastructure.Time;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Infrastructure;
+namespace SchoolAccount.Collect.Infrastructure;
public static class DependencyInjection
{
diff --git a/src/SchoolAccount.Infrastructure/SchoolAccount.Infrastructure.csproj b/src/SchoolAccount.Collect.Infrastructure/SchoolAccount.Collect.Infrastructure.csproj
similarity index 53%
rename from src/SchoolAccount.Infrastructure/SchoolAccount.Infrastructure.csproj
rename to src/SchoolAccount.Collect.Infrastructure/SchoolAccount.Collect.Infrastructure.csproj
index 0322626..e8ec7e9 100644
--- a/src/SchoolAccount.Infrastructure/SchoolAccount.Infrastructure.csproj
+++ b/src/SchoolAccount.Collect.Infrastructure/SchoolAccount.Collect.Infrastructure.csproj
@@ -4,10 +4,10 @@
-
+
-
+
diff --git a/src/SchoolAccount.Infrastructure/Time/DateTimeProvider.cs b/src/SchoolAccount.Collect.Infrastructure/Time/DateTimeProvider.cs
similarity index 53%
rename from src/SchoolAccount.Infrastructure/Time/DateTimeProvider.cs
rename to src/SchoolAccount.Collect.Infrastructure/Time/DateTimeProvider.cs
index 8a5d403..49d2816 100644
--- a/src/SchoolAccount.Infrastructure/Time/DateTimeProvider.cs
+++ b/src/SchoolAccount.Collect.Infrastructure/Time/DateTimeProvider.cs
@@ -1,6 +1,6 @@
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.SharedKernel;
-namespace SchoolAccount.Infrastructure.Time;
+namespace SchoolAccount.Collect.Infrastructure.Time;
internal sealed class DateTimeProvider : IDateTimeProvider
{
diff --git a/src/SchoolAccount.SharedKernel/Error.cs b/src/SchoolAccount.Collect.SharedKernel/Error.cs
similarity index 95%
rename from src/SchoolAccount.SharedKernel/Error.cs
rename to src/SchoolAccount.Collect.SharedKernel/Error.cs
index 163a345..03ce518 100644
--- a/src/SchoolAccount.SharedKernel/Error.cs
+++ b/src/SchoolAccount.Collect.SharedKernel/Error.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.SharedKernel;
+namespace SchoolAccount.Collect.SharedKernel;
public record Error
{
diff --git a/src/SchoolAccount.SharedKernel/ErrorType.cs b/src/SchoolAccount.Collect.SharedKernel/ErrorType.cs
similarity index 70%
rename from src/SchoolAccount.SharedKernel/ErrorType.cs
rename to src/SchoolAccount.Collect.SharedKernel/ErrorType.cs
index 435a2b0..e57c3ca 100644
--- a/src/SchoolAccount.SharedKernel/ErrorType.cs
+++ b/src/SchoolAccount.Collect.SharedKernel/ErrorType.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.SharedKernel;
+namespace SchoolAccount.Collect.SharedKernel;
public enum ErrorType
{
diff --git a/src/SchoolAccount.SharedKernel/IDateTimeProvider.cs b/src/SchoolAccount.Collect.SharedKernel/IDateTimeProvider.cs
similarity index 58%
rename from src/SchoolAccount.SharedKernel/IDateTimeProvider.cs
rename to src/SchoolAccount.Collect.SharedKernel/IDateTimeProvider.cs
index 7564b05..3507f70 100644
--- a/src/SchoolAccount.SharedKernel/IDateTimeProvider.cs
+++ b/src/SchoolAccount.Collect.SharedKernel/IDateTimeProvider.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.SharedKernel;
+namespace SchoolAccount.Collect.SharedKernel;
public interface IDateTimeProvider
{
diff --git a/src/SchoolAccount.SharedKernel/Result.cs b/src/SchoolAccount.Collect.SharedKernel/Result.cs
similarity index 96%
rename from src/SchoolAccount.SharedKernel/Result.cs
rename to src/SchoolAccount.Collect.SharedKernel/Result.cs
index 0549a57..e800768 100644
--- a/src/SchoolAccount.SharedKernel/Result.cs
+++ b/src/SchoolAccount.Collect.SharedKernel/Result.cs
@@ -1,6 +1,6 @@
using System.Diagnostics.CodeAnalysis;
-namespace SchoolAccount.SharedKernel;
+namespace SchoolAccount.Collect.SharedKernel;
public class Result
{
diff --git a/src/SchoolAccount.Collect.SharedKernel/SchoolAccount.Collect.SharedKernel.csproj b/src/SchoolAccount.Collect.SharedKernel/SchoolAccount.Collect.SharedKernel.csproj
new file mode 100644
index 0000000..e670576
--- /dev/null
+++ b/src/SchoolAccount.Collect.SharedKernel/SchoolAccount.Collect.SharedKernel.csproj
@@ -0,0 +1,5 @@
+
+
+ SchoolAccount.Collect.SharedKernel
+
+
diff --git a/src/SchoolAccount.SharedKernel/ValidationError.cs b/src/SchoolAccount.Collect.SharedKernel/ValidationError.cs
similarity index 86%
rename from src/SchoolAccount.SharedKernel/ValidationError.cs
rename to src/SchoolAccount.Collect.SharedKernel/ValidationError.cs
index ffa5e13..59482cd 100644
--- a/src/SchoolAccount.SharedKernel/ValidationError.cs
+++ b/src/SchoolAccount.Collect.SharedKernel/ValidationError.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.SharedKernel;
+namespace SchoolAccount.Collect.SharedKernel;
public sealed record ValidationError(Error[] Errors)
: Error("Validation.General", "One or more validation errors occurred", ErrorType.Validation)
diff --git a/src/SchoolAccount.Domain/SchoolAccount.Domain.csproj b/src/SchoolAccount.Domain/SchoolAccount.Domain.csproj
deleted file mode 100644
index df9cf94..0000000
--- a/src/SchoolAccount.Domain/SchoolAccount.Domain.csproj
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/SchoolAccount.SharedKernel/SchoolAccount.SharedKernel.csproj b/src/SchoolAccount.SharedKernel/SchoolAccount.SharedKernel.csproj
deleted file mode 100644
index e6c35ec..0000000
--- a/src/SchoolAccount.SharedKernel/SchoolAccount.SharedKernel.csproj
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/SchoolAccount.Web.Api/Dockerfile b/src/SchoolAccount.Web.Api/Dockerfile
deleted file mode 100644
index ce86a16..0000000
--- a/src/SchoolAccount.Web.Api/Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
-
-# This stage is used when running from VS in fast mode (Default for Debug configuration)
-FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
-USER $APP_UID
-WORKDIR /app
-EXPOSE 8080
-
-
-# This stage is used to build the service project
-FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
-ARG BUILD_CONFIGURATION=Release
-WORKDIR /src
-COPY ["Directory.Packages.props", "."]
-COPY ["Directory.Build.props", "."]
-COPY ["src/SchoolAccount.Web.Api/SchoolAccount.Web.Api.csproj", "src/SchoolAccount.Web.Api/"]
-COPY ["src/SchoolAccount.Infrastructure/SchoolAccount.Infrastructure.csproj", "src/SchoolAccount.Infrastructure/"]
-COPY ["src/SchoolAccount.Application/SchoolAccount.Application.csproj", "src/SchoolAccount.Application/"]
-COPY ["src/SchoolAccount.Domain/SchoolAccount.Domain.csproj", "src/SchoolAccount.Domain/"]
-COPY ["src/SchoolAccount.SharedKernel/SchoolAccount.SharedKernel.csproj", "src/SchoolAccount.SharedKernel/"]
-RUN dotnet restore "./src/SchoolAccount.Web.Api/SchoolAccount.Web.Api.csproj"
-COPY . .
-WORKDIR "/src/src/SchoolAccount.Web.Api"
-RUN dotnet build "./SchoolAccount.Web.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
-
-# This stage is used to publish the service project to be copied to the final stage
-FROM build AS publish
-ARG BUILD_CONFIGURATION=Release
-RUN dotnet publish "./SchoolAccount.Web.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
-
-# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
-FROM base AS final
-WORKDIR /app
-COPY --from=publish /app/publish .
-ENTRYPOINT ["dotnet", "SchoolAccount.Web.Api.dll"]
\ No newline at end of file
diff --git a/tests/SchoolAccount.ArchitectureTests/BaseTest.cs b/tests/SchoolAccount.ArchitectureTests/BaseTest.cs
deleted file mode 100644
index 9019d3d..0000000
--- a/tests/SchoolAccount.ArchitectureTests/BaseTest.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Reflection;
-
-namespace SchoolAccount.ArchitectureTests;
-
-public abstract class BaseTest
-{
- protected static readonly Assembly DomainAssembly =
- typeof(SchoolAccount.Domain.AssemblyMarker).Assembly;
- protected static readonly Assembly ApplicationAssembly =
- typeof(SchoolAccount.Application.DependencyInjection).Assembly;
- protected static readonly Assembly InfrastructureAssembly =
- typeof(SchoolAccount.Infrastructure.DependencyInjection).Assembly;
- protected static readonly Assembly PresentationAssembly =
- typeof(SchoolAccount.Web.Api.DependencyInjection).Assembly;
-}
diff --git a/tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs b/tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs
similarity index 61%
rename from tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs
rename to tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs
index 9511e53..c8e050e 100644
--- a/tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs
+++ b/tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/ClientOrganisationResponse.cs
@@ -1,4 +1,4 @@
-namespace SchoolAccount.Web.Api.IntegrationTests.EndPoints.Organisations;
+namespace SchoolAccount.Collect.Api.IntegrationTests.EndPoints.Organisations;
public record ClientOrganisationResponse(
string LocalAuthorityCode,
diff --git a/tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs b/tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs
similarity index 92%
rename from tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs
rename to tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs
index d1efebe..99059c1 100644
--- a/tests/SchoolAccount.Web.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs
+++ b/tests/SchoolAccount.Collect.Api.IntegrationTests/EndPoints/Organisations/GetByLaestabTests.cs
@@ -2,13 +2,13 @@
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.AspNetCore.TestHost;
using NSubstitute;
-using SchoolAccount.Application.Abstractions.Messaging;
-using SchoolAccount.Application.Organisations.GetByLaestab;
-using SchoolAccount.SharedKernel;
-using SchoolAccount.Web.Api.Endpoints;
+using SchoolAccount.Collect.Api.Endpoints;
+using SchoolAccount.Collect.Application.Abstractions.Messaging;
+using SchoolAccount.Collect.Application.Organisations.GetByLaestab;
+using SchoolAccount.Collect.SharedKernel;
using Shouldly;
-namespace SchoolAccount.Web.Api.IntegrationTests.EndPoints.Organisations;
+namespace SchoolAccount.Collect.Api.IntegrationTests.EndPoints.Organisations;
public class GetByLaestabTests : IClassFixture>
{
diff --git a/tests/SchoolAccount.Web.Api.IntegrationTests/SchoolAccount.Web.Api.IntegrationTests.csproj b/tests/SchoolAccount.Collect.Api.IntegrationTests/SchoolAccount.Collect.Api.IntegrationTests.csproj
similarity index 89%
rename from tests/SchoolAccount.Web.Api.IntegrationTests/SchoolAccount.Web.Api.IntegrationTests.csproj
rename to tests/SchoolAccount.Collect.Api.IntegrationTests/SchoolAccount.Collect.Api.IntegrationTests.csproj
index 99faf13..7ae17f9 100644
--- a/tests/SchoolAccount.Web.Api.IntegrationTests/SchoolAccount.Web.Api.IntegrationTests.csproj
+++ b/tests/SchoolAccount.Collect.Api.IntegrationTests/SchoolAccount.Collect.Api.IntegrationTests.csproj
@@ -22,6 +22,6 @@
-
+
diff --git a/tests/SchoolAccount.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs
similarity index 86%
rename from tests/SchoolAccount.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs
rename to tests/SchoolAccount.Collect.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs
index 0ba5c1d..3dba038 100644
--- a/tests/SchoolAccount.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs
+++ b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/GetOrganisationByLaestabQueryHandlerTests.cs
@@ -1,9 +1,9 @@
using NSubstitute;
-using SchoolAccount.Application.Organisations.GetByLaestab;
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.Application.Organisations.GetByLaestab;
+using SchoolAccount.Collect.SharedKernel;
using Shouldly;
-namespace SchoolAccount.Application.UnitTests.Organisations;
+namespace SchoolAccount.Collect.Application.UnitTests.Organisations;
public class GetOrganisationByLaestabQueryHandlerTests
{
diff --git a/tests/SchoolAccount.Application.UnitTests/Organisations/LaestabValueTests.cs b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/LaestabValueTests.cs
similarity index 89%
rename from tests/SchoolAccount.Application.UnitTests/Organisations/LaestabValueTests.cs
rename to tests/SchoolAccount.Collect.Application.UnitTests/Organisations/LaestabValueTests.cs
index 5d2ffc8..a7411c9 100644
--- a/tests/SchoolAccount.Application.UnitTests/Organisations/LaestabValueTests.cs
+++ b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/LaestabValueTests.cs
@@ -1,7 +1,7 @@
-using SchoolAccount.Application.Organisations.GetByLaestab;
+using SchoolAccount.Collect.Application.Organisations.GetByLaestab;
using Shouldly;
-namespace SchoolAccount.Application.UnitTests.Organisations;
+namespace SchoolAccount.Collect.Application.UnitTests.Organisations;
public class LaestabValueTests
{
diff --git a/tests/SchoolAccount.Application.UnitTests/Organisations/StatusCalculatorTests.cs b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/StatusCalculatorTests.cs
similarity index 93%
rename from tests/SchoolAccount.Application.UnitTests/Organisations/StatusCalculatorTests.cs
rename to tests/SchoolAccount.Collect.Application.UnitTests/Organisations/StatusCalculatorTests.cs
index 3dccab3..581bcc2 100644
--- a/tests/SchoolAccount.Application.UnitTests/Organisations/StatusCalculatorTests.cs
+++ b/tests/SchoolAccount.Collect.Application.UnitTests/Organisations/StatusCalculatorTests.cs
@@ -1,9 +1,9 @@
using NSubstitute;
-using SchoolAccount.Application.Organisations.GetByLaestab;
-using SchoolAccount.SharedKernel;
+using SchoolAccount.Collect.Application.Organisations.GetByLaestab;
+using SchoolAccount.Collect.SharedKernel;
using Shouldly;
-namespace SchoolAccount.Application.UnitTests.Organisations;
+namespace SchoolAccount.Collect.Application.UnitTests.Organisations;
public class StatusCalculatorTests
{
diff --git a/tests/SchoolAccount.Application.UnitTests/SchoolAccount.Application.UnitTests.csproj b/tests/SchoolAccount.Collect.Application.UnitTests/SchoolAccount.Collect.Application.UnitTests.csproj
similarity index 86%
rename from tests/SchoolAccount.Application.UnitTests/SchoolAccount.Application.UnitTests.csproj
rename to tests/SchoolAccount.Collect.Application.UnitTests/SchoolAccount.Collect.Application.UnitTests.csproj
index c7b420b..d9dcd93 100644
--- a/tests/SchoolAccount.Application.UnitTests/SchoolAccount.Application.UnitTests.csproj
+++ b/tests/SchoolAccount.Collect.Application.UnitTests/SchoolAccount.Collect.Application.UnitTests.csproj
@@ -21,6 +21,6 @@
-
+
diff --git a/tests/SchoolAccount.Collect.ArchitectureTests/BaseTest.cs b/tests/SchoolAccount.Collect.ArchitectureTests/BaseTest.cs
new file mode 100644
index 0000000..4e9d985
--- /dev/null
+++ b/tests/SchoolAccount.Collect.ArchitectureTests/BaseTest.cs
@@ -0,0 +1,14 @@
+using System.Reflection;
+
+namespace SchoolAccount.Collect.ArchitectureTests;
+
+public abstract class BaseTest
+{
+ protected static readonly Assembly DomainAssembly = typeof(Domain.AssemblyMarker).Assembly;
+ protected static readonly Assembly ApplicationAssembly =
+ typeof(Application.DependencyInjection).Assembly;
+ protected static readonly Assembly InfrastructureAssembly =
+ typeof(Infrastructure.DependencyInjection).Assembly;
+ protected static readonly Assembly PresentationAssembly =
+ typeof(Api.DependencyInjection).Assembly;
+}
diff --git a/tests/SchoolAccount.ArchitectureTests/GlobalUsings.cs b/tests/SchoolAccount.Collect.ArchitectureTests/GlobalUsings.cs
similarity index 100%
rename from tests/SchoolAccount.ArchitectureTests/GlobalUsings.cs
rename to tests/SchoolAccount.Collect.ArchitectureTests/GlobalUsings.cs
diff --git a/tests/SchoolAccount.ArchitectureTests/Layers/LayerTests.cs b/tests/SchoolAccount.Collect.ArchitectureTests/Layers/LayerTests.cs
similarity index 94%
rename from tests/SchoolAccount.ArchitectureTests/Layers/LayerTests.cs
rename to tests/SchoolAccount.Collect.ArchitectureTests/Layers/LayerTests.cs
index 368e7ee..123bce3 100644
--- a/tests/SchoolAccount.ArchitectureTests/Layers/LayerTests.cs
+++ b/tests/SchoolAccount.Collect.ArchitectureTests/Layers/LayerTests.cs
@@ -2,7 +2,7 @@
using Shouldly;
using TestResult = NetArchTest.Rules.TestResult;
-namespace SchoolAccount.ArchitectureTests.Layers;
+namespace SchoolAccount.Collect.ArchitectureTests.Layers;
public class LayerTests : BaseTest
{
@@ -12,7 +12,7 @@ public void Domain_Should_NotHaveDependencyOnApplication()
TestResult result = Types
.InAssembly(DomainAssembly)
.Should()
- .NotHaveDependencyOn("SchoolAccount.Application")
+ .NotHaveDependencyOn("SchoolAccount.Collect.Application")
.GetResult();
result.IsSuccessful.ShouldBeTrue();
diff --git a/tests/SchoolAccount.ArchitectureTests/SchoolAccount.ArchitectureTests.csproj b/tests/SchoolAccount.Collect.ArchitectureTests/SchoolAccount.Collect.ArchitectureTests.csproj
similarity index 85%
rename from tests/SchoolAccount.ArchitectureTests/SchoolAccount.ArchitectureTests.csproj
rename to tests/SchoolAccount.Collect.ArchitectureTests/SchoolAccount.Collect.ArchitectureTests.csproj
index 29ad36f..ec97bd5 100644
--- a/tests/SchoolAccount.ArchitectureTests/SchoolAccount.ArchitectureTests.csproj
+++ b/tests/SchoolAccount.Collect.ArchitectureTests/SchoolAccount.Collect.ArchitectureTests.csproj
@@ -15,6 +15,6 @@
-
+