Rebrand project: DocumentOperator to DocumentService

This commit implements a complete rebranding of the project:
- Updated all namespaces from `DocumentOperator` to `DocumentService`.
- Renamed file paths, embedded resources, and test data references.
- Updated configuration keys, logging paths, and Redis instance names.
- Revised documentation to reflect the new project name.
- Modified project and solution files to align with the new structure.
- Updated class names, DTOs, commands, queries, and handlers.
- Adjusted middleware, controllers, and API endpoints.
- Updated Swagger metadata and API titles to `DocumentService API`.
- Refactored test namespaces, resource paths, and embedded resources.
- Updated build and deployment configurations for the new name.
- Replaced all references to `DocumentOperator` in comments and literals.

These changes ensure consistency across the codebase and documentation.
This commit is contained in:
2026-07-30 14:02:56 +02:00
parent b6bb894257
commit 0e88b349d7
88 changed files with 307 additions and 222 deletions

View File

@@ -1,5 +1,5 @@
using DocumentOperator.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
using DocumentOperator.Application.Common.DTOs;
using DocumentService.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
using DocumentService.Application.Common.DTOs;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
using System.Net;
@@ -7,7 +7,7 @@ using System.Net.Http.Json;
using System.Text.Json;
using Xunit;
namespace DocumentOperator.Tests.Integration.API;
namespace DocumentService.Tests.Integration.API;
public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicationFactory<Program>>
{
@@ -27,7 +27,7 @@ public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicati
public async Task POST_ExtractSwissQrCode_ValidRequest_Returns200()
{
// Arrange
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentOperator.Tests.TestData.Pdfs.valid.pdf");
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentService.Tests.TestData.Pdfs.valid.pdf");
var request = new ExtractSwissQrCodeBase64Request
{
@@ -77,7 +77,7 @@ public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicati
{
// Arrange: References are OPTIONAL - null should not cause validation error (400)
// Using pdfWithSwissQRCode.pdf which actually has a QR code, so we get 200
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentOperator.Tests.TestData.Pdfs.pdfWithSwissQRCode.pdf");
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentService.Tests.TestData.Pdfs.pdfWithSwissQRCode.pdf");
var request = new
{

View File

@@ -1,12 +1,12 @@
using DocumentOperator.API.Controllers; // For CheckPdfAttachmentsRequest DTO
using DocumentOperator.Application.Common.DTOs;
using DocumentService.API.Controllers; // For CheckPdfAttachmentsRequest DTO
using DocumentService.Application.Common.DTOs;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
using System.Net;
using System.Net.Http.Json;
using Xunit;
namespace DocumentOperator.Tests.Integration.API;
namespace DocumentService.Tests.Integration.API;
/// <summary>
/// Integration tests for PdfAttachmentController.
@@ -31,7 +31,7 @@ public class PdfAttachmentControllerTests : IClassFixture<WebApplicationFactory<
private static async Task<byte[]> LoadTestPdfAsync(string filename)
{
var assembly = typeof(PdfAttachmentControllerTests).Assembly;
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
using var stream = assembly.GetManifestResourceStream(resourceName);
if (stream == null)

View File

@@ -3,12 +3,12 @@ using System.Net.Http.Headers;
using System.Reflection;
using System.Text;
using System.Text.Json;
using DocumentOperator.API.Controllers;
using DocumentOperator.Domain.Models.ValueObjects;
using DocumentService.API.Controllers;
using DocumentService.Domain.Models.ValueObjects;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
namespace DocumentOperator.Tests.Integration.API;
namespace DocumentService.Tests.Integration.API;
public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<Program>>
{
@@ -22,7 +22,7 @@ public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<
private static Stream LoadTestPdfAsStream(string fileName)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{fileName}";
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{fileName}";
return assembly.GetManifestResourceStream(resourceName)
?? throw new FileNotFoundException($"Embedded resource not found: {resourceName}");
}

View File

@@ -1,12 +1,12 @@
using DocumentOperator.API.Controllers; // For Base64Request DTOs
using DocumentOperator.Application.Common.DTOs;
using DocumentService.API.Controllers; // For Base64Request DTOs
using DocumentService.Application.Common.DTOs;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
using System.Net;
using System.Net.Http.Json;
using Xunit;
namespace DocumentOperator.Tests.Integration.API;
namespace DocumentService.Tests.Integration.API;
public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<Program>>
{
@@ -27,7 +27,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
// Arrange
// Verwende ein echtes Test-PDF (embedded resource aus Unit Tests)
var assembly = typeof(PdfValidationControllerTests).Assembly;
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
byte[] pdfBytes;
using (var stream = assembly.GetManifestResourceStream(resourceName))
@@ -101,7 +101,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
{
// Arrange
var assembly = typeof(PdfValidationControllerTests).Assembly;
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
byte[] pdfBytes;
using (var stream = assembly.GetManifestResourceStream(resourceName))
@@ -176,7 +176,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
{
// Arrange
var assembly = typeof(PdfValidationControllerTests).Assembly;
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
byte[] pdfBytes;
using (var stream = assembly.GetManifestResourceStream(resourceName))
@@ -250,7 +250,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
{
// Arrange
var assembly = typeof(PdfValidationControllerTests).Assembly;
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
byte[] pdfBytes;
using (var stream = assembly.GetManifestResourceStream(resourceName))

View File

@@ -1,12 +1,12 @@
using AutoMapper;
using DocumentOperator.Application.CheckPdfAttachments.Queries;
using DocumentOperator.Application.Common.DTOs;
using DocumentOperator.Application.Common.Interfaces;
using DocumentService.Application.CheckPdfAttachments.Queries;
using DocumentService.Application.Common.DTOs;
using DocumentService.Application.Common.Interfaces;
using FluentAssertions;
using Moq;
namespace DocumentOperator.Tests.Unit.Application.CheckPdfAttachments;
namespace DocumentService.Tests.Unit.Application.CheckPdfAttachments;
/// <summary>
/// Unit tests for CheckPdfAttachmentsQueryHandler.

View File

@@ -1,13 +1,13 @@
using AutoMapper;
using DocumentOperator.Application.Common.DTOs;
using DocumentOperator.Application.Common.Interfaces;
using DocumentOperator.Application.ValidatePdf.Queries;
using DocumentOperator.Domain.Common.Exceptions;
using DocumentService.Application.Common.DTOs;
using DocumentService.Application.Common.Interfaces;
using DocumentService.Application.ValidatePdf.Queries;
using DocumentService.Domain.Common.Exceptions;
using FluentAssertions;
using Moq;
using Xunit;
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdf;
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdf;
public class ValidatePdfHandlerTests
{

View File

@@ -1,14 +1,14 @@
using AutoMapper;
using DocumentOperator.Application.Common.DTOs;
using DocumentOperator.Application.Common.Interfaces;
using DocumentOperator.Application.ValidatePdfA.Queries;
using DocumentOperator.Domain.Common.Exceptions;
using DocumentService.Application.Common.DTOs;
using DocumentService.Application.Common.Interfaces;
using DocumentService.Application.ValidatePdfA.Queries;
using DocumentService.Domain.Common.Exceptions;
using FluentAssertions;
using Moq;
using Xunit;
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdfA;
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdfA;
public class ValidatePdfAQueryHandlerTests
{

View File

@@ -1,11 +1,11 @@
using System.Reflection;
using DocumentOperator.Application.Common.DTOs;
using DocumentOperator.Application.Common.Interfaces;
using DocumentOperator.Domain.Common.Exceptions;
using DocumentOperator.Infrastructure.Services.PdfProcessing;
using DocumentService.Application.Common.DTOs;
using DocumentService.Application.Common.Interfaces;
using DocumentService.Domain.Common.Exceptions;
using DocumentService.Infrastructure.Services.PdfProcessing;
using FluentAssertions;
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.PdfProcessing;
namespace DocumentService.Tests.Unit.Infrastructure.Services.PdfProcessing;
/// <summary>
/// Unit tests for DevExpressPdfProcessor.
@@ -31,7 +31,7 @@ public class DevExpressPdfProcessorTests
private static byte[] LoadTestPdf(string filename)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
using var stream = assembly.GetManifestResourceStream(resourceName);

View File

@@ -1,10 +1,10 @@
using System.Reflection;
using DocumentOperator.Application.Common.Interfaces;
using DocumentOperator.Domain.Common.Exceptions;
using DocumentOperator.Infrastructure.Services.QrCodeProcessing;
using DocumentService.Application.Common.Interfaces;
using DocumentService.Domain.Common.Exceptions;
using DocumentService.Infrastructure.Services.QrCodeProcessing;
using FluentAssertions;
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
namespace DocumentService.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
/// <summary>
/// Unit tests for DevExpressSwissQrCodeProcessor.
@@ -30,7 +30,7 @@ public class DevExpressSwissQrCodeProcessorTests
private static Stream LoadTestPdf(string filename)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
var stream = assembly.GetManifestResourceStream(resourceName);