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.
- Update unit tests to assert (Bill, string[]) tuple return
- Update integration tests for new response structure (Bill + RawLines)
- Fix exception message assertion in DevExpressSwissQrCodeProcessorTests
- All 34 tests passing, 6 skipped (require real Swiss QR Bill PDFs)
Integration test updates:
- PdfValidationControllerTests.cs (new)
- Test /api/pdf/validation/validate endpoint
- Test BOTH multipart/form-data AND Base64 JSON
- ExtractSwissQrCodeEndpointTests.cs (updated)
- Update endpoint path to /api/swissqrcode/extract
- Test BOTH input formats
Unit test updates:
- ValidatePdfHandlerTests.cs:
- Update for Query + Handler co-location
- Test AutoMapper integration
- ExtractSwissQrCodeHandlerTests.cs:
- Update for Query + Handler co-location
- Test AutoMapper integration
Deleted:
- DocumentEndpointsTests.cs (Minimal API tests, no longer relevant)
Result: 20/20 tests passing, Controller endpoint coverage
Added a new `/extract-swiss-qr-code` endpoint to extract and parse Swiss QR Codes from the last page of a PDF document. Implemented the `ExtractSwissQrCode` handler method, along with helper methods to map domain value objects (`SwissQrCodeData` and `AddressData`) to DTOs.
Updated `ExceptionHandlingMiddleware` to handle the new `SwissQrCodeNotFoundException` with a 404 Not Found response.
Added integration tests in `ExtractSwissQrCodeEndpointTests` to validate the endpoint's behavior for valid requests, invalid Base64 input, empty references, and empty PDFs. Introduced a helper method to load embedded PDF resources as Base64 strings for testing.
Updated `using` directives to include necessary namespaces for the new feature and exception handling.