Skip to content

feat(pdf): implement PdfExporter with PDFBox - 15 tests passing - #6

Merged
4rthur-Root merged 1 commit into
mainfrom
feature/role-2
Jul 13, 2026
Merged

feat(pdf): implement PdfExporter with PDFBox - 15 tests passing#6
4rthur-Root merged 1 commit into
mainfrom
feature/role-2

Conversation

@akpmarcelin

Copy link
Copy Markdown
Collaborator

[Rôle 2] DatabaseManager + PdfExporter — implémentation complète

Ce qui a été fait

  • DatabaseManager : implémentation complète de la persistance SQLite

    • Connexion unique persistante (compatible :memory: pour les tests)
    • PRAGMA foreign_keys = ON activé au démarrage
    • CRUD complet : Lab, VirtualMachine, Snapshot, JournalEntry, AuditEntry, AppConfig
    • Gestion des VM orphelines, des clés étrangères, des types LocalDateTimeString
  • PdfExporter : génération de rapport PDF via Apache PDFBox 3.x

    • En-tête du labo, liste des VMs, snapshots, journal de bord
    • Gestion des sauts de page automatiques
    • Texte long découpé en lignes (wrapping)
    • Robuste aux valeurs nulles

Tests

  • 30 tests unitaires pour DatabaseManager (SQLite en mémoire)
  • 15 tests unitaires pour PdfExporter (fichiers temporaires)
  • 60 tests au total — 0 échec

Bugs résolus en cours de route

  • Connexion SQLite :memory: se réinitialisait entre chaque appel → connexion unique partagée
  • try-with-resources fermait la connexion partagée → retiré de la Connection
  • ON DELETE SET NULL inactif → PRAGMA foreign_keys = ON ajouté

@4rthur-Root
4rthur-Root merged commit 3312011 into main Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants