Add ZIP-wrapped CAMT parsing and real bank file tests
Playwright Tests / test (push) Has been cancelled

- Support parsing camt.052 ZIP archives in CamtParser and BankingService
- Add CamtZipParserTests for ZIP parsing (single/multi/malformed/empty cases)
- Add CamtRealFileTests: integration tests for real bank exports (ZIP, XML, CAMT, MT940, STA) in git-ignored test data dir
- Update .gitignore and add README.md for test data usage
- Copy test data files in Fuchs.Tests.csproj; add .gitkeep
- Refactor BankingService CAMT mapping logic
- Overhaul connection string config: use {username}/{password} tokens, resolve from secrets at runtime, update appsettings and Key Vault keys
This commit is contained in:
Stefan
2026-07-01 22:06:29 +02:00
parent 8ecf97ed29
commit 3035ef1719
11 changed files with 507 additions and 45 deletions
+1
View File
@@ -0,0 +1 @@

+32
View File
@@ -0,0 +1,32 @@
# Banking Test Samples
Lege echte Bankexport-Dateien hier ab, um die Integrations-Smoketests in
`CamtRealFileTests` zu aktivieren.
> **Diese Dateien werden nie committed** (sensible Finanzdaten — gilt für alle
> `.zip`, `.xml`, `.camt`, `.sta` und `.mt940` in diesem Verzeichnis).
## Wo ablegen
| Dateiformat | Erwarteter Inhalt | Beispieldateiname |
|-------------|------------------|-------------------|
| `.zip` | camt.052-ZIP-Archiv der Bank (enthält XML-Dateien) | `camt052_jan2025.zip` |
| `.xml` | camt.053 (oder camt.052 / camt.054) als plain XML | `camt053_jan2025.xml` |
| `.camt` | alternativer Dateiname für CAMT-XML | `umsaetze.camt` |
Jede `.zip`- und `.xml`/`.camt`-Datei wird **automatisch** gefunden und getestet —
keine Anpassung am Code nötig.
## Was wird geprüft
- ZIP-Dateien: `CamtParser.ParseZip` liefert ≥ 1 Statement mit IBAN und Einträgen
- XML-Dateien: `CamtParser.Parse` erkennt das Dokument als CAMT und liefert valide Einträge
- Beide: `BankingService.ParseToDatatable` liefert ≥ 1 Zeile in der DataTable
- Dokumenttyp ist bekannt (nicht `Unknown`)
- Jeder Eintrag hat Betrag > 0 und mindestens ein Datum
## Hinweis
Sind keine Dateien vorhanden, generiert xUnit 0 Testfälle (die Tests tauchen
nicht im Runner auf). Sobald du eine Datei ablegst und den Build neu startest,
erscheinen die Tests automatisch.