test(integration): Add 10 integration tests for annotation endpoints + update docs
Integration tests: - 5 happy path tests (TextMarkup, FreeText, StickyNote, Circle, Square) with multipart + Base64 mix - 5 validation error tests (invalid Base64, page number, missing content/style, invalid color) - All existing 7 merge tests retained (now 17 total in PdfOperationsControllerTests) Documentation updates (AGENTS.md): - Update test count: 82 -> 101 passed, 7 skipped - Update PdfOperationsController status: 1/N -> 2/3 endpoints (merge + annotate DONE, stamp TODO) - Add test breakdown by feature (6 features listed) - Update 'Run tests' section with Feature 6 mention Test results: 101 PASSED, 7 SKIPPED, 0 FAILED
This commit is contained in:
21
AGENTS.md
21
AGENTS.md
@@ -188,7 +188,7 @@ After completing all Phase 1-3 controllers (PdfValidation, PdfAttachment, SwissQ
|
||||
dotnet build
|
||||
```
|
||||
|
||||
**Run tests (82 passed, 7 skipped as of Feature 5 - PDF Merge):**
|
||||
**Run tests (101 passed, 7 skipped as of Feature 6 - PDF Annotation):**
|
||||
```powershell
|
||||
dotnet test
|
||||
```
|
||||
@@ -276,7 +276,7 @@ Do NOT add `if (result.IsSuccess)` checks. Throw exceptions for errors. The midd
|
||||
| **PdfValidationController** | ✅ DONE | 13 (7 validate + 6 validate-pdfa) |
|
||||
| **SwissQrCodeController** | ✅ DONE | 2 |
|
||||
| **PdfAttachmentController** | ⏳ Partial (2/3 endpoints) | 10 (4 check + 6 extract) |
|
||||
| **PdfOperationsController** | ⏳ Partial (1/N endpoints) | 7 (merge endpoint only) |
|
||||
| **PdfOperationsController** | ⏳ Partial (2/3 endpoints) | 29 (7 merge + 22 annotate: 12 unit + 10 integration) |
|
||||
| **PdfConversionController** | ⏳ Pending | 0 |
|
||||
|
||||
**PdfAttachmentController Status:**
|
||||
@@ -286,8 +286,8 @@ Do NOT add `if (result.IsSuccess)` checks. Throw exceptions for errors. The midd
|
||||
|
||||
**PdfOperationsController Status:**
|
||||
- ✅ `POST /api/pdf/operations/merge` - DONE (Phase 1, Priority 5) - Merges multiple PDFs with optional page ranges (multipart + Base64)
|
||||
- ✅ `POST /api/pdf/operations/annotate` - DONE (Phase 2, Priority 6) - Adds annotations (TextMarkup/FreeText/StickyNote/Circle/Square) with multipart + Base64 support
|
||||
- ⏳ `POST /api/pdf/operations/stamp` - TODO (Phase 2, Priority 6)
|
||||
- ⏳ `POST /api/pdf/operations/annotate` - TODO (Phase 2, Priority 6)
|
||||
|
||||
**Note:** PdfRenderController removed - moved to .NET client library.
|
||||
|
||||
@@ -385,10 +385,19 @@ DocumentOperator.Tests/
|
||||
- Matches Application layer structure exactly
|
||||
|
||||
4. **Test Pyramid:**
|
||||
- **Unit tests (15):** Fast, isolated, many scenarios
|
||||
- **Integration tests (15):** Slower, full pipeline, critical paths only
|
||||
- **Unit tests (60+):** Fast, isolated, many scenarios
|
||||
- **Integration tests (27):** Slower, full pipeline, critical paths only
|
||||
|
||||
**Test count:** 30 tests total (as of Feature 3 - PDF/A Validation)
|
||||
**Test count:** 101 passed, 7 skipped (as of Feature 6 - PDF Annotation)
|
||||
|
||||
**Test breakdown by feature:**
|
||||
- Feature 1 (PDF Validation): 13 integration tests
|
||||
- Feature 2 (Swiss QR Code): 2 integration tests
|
||||
- Feature 3 (PDF/A Validation): 6 integration tests (validate-pdfa) + 4 unit tests (handler)
|
||||
- Feature 4 (PDF Attachments): 10 tests (4 check + 6 extract integration)
|
||||
- Feature 5 (PDF Merge): 7 integration + 10 unit tests (DevExpressPdfProcessor)
|
||||
- Feature 6 (PDF Annotation): 10 integration + 12 unit tests (DevExpressPdfProcessor)
|
||||
- Infrastructure: 37 unit tests (DevExpressPdfProcessor for validation, attachments, merge, annotation)
|
||||
|
||||
**FluentValidation in tests:**
|
||||
- Base64 format validation happens in `ValidatePdfQueryValidator` and `ValidatePdfAQueryValidator`
|
||||
|
||||
Reference in New Issue
Block a user