Phase 7: Tests erweitert + Mongo-Parser extrahiert (testbar)

Tests (jetzt 48 grün):
- DbContextMappingTests: sichert core_/mod_-Tabellennamen, Position-Composite-Key,
  TrackedTrader-Key, ClosedTradeRow nicht gemappt, AccountState.OpenPositions ignoriert.
- PositionRepositoryTests: Live/Demo-Trennung, Upsert setzt Account+Demo-Flag,
  Update ohne Duplikat, DeleteLive, DropDemo.
- MarketRepositoryTests: GetActive filtert Closed, Upsert-Update, FindByTokenId.
- TradeLogRepositoryTests: GetRecent (Sortierung+Limit), Find-Predikat, Guid-Id unique.
- MongoExportParserTests: String-Dezimale, null->"", fehlende Felder->Default,
  AssignedAccountIds-Array, Category-Default, Nicht-Array->leer.

Refactor:
- Mongo-Export-Parsing aus ConfigMigrator in testbare Klasse
  PolyTrader.Modules.CopyTrading.ConfigImport.MongoExportParser ausgelagert
  (ParseAccounts -> Account+Settings, ParseTraders). ConfigMigrator nutzt sie;
  --migrate-json end-to-end verifiziert (3/3/32).
- PolyTrader.App.csproj: tests/** vom Default-Glob ausgeschlossen (App zog sonst
  die Testdateien mit rein -> doppelte AssemblyInfo/Xunit-Fehler).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-07-06 11:52:52 +02:00
co-authored by Claude Opus 4.8
parent ca16cd8a91
commit 1b51872f00
8 changed files with 549 additions and 121 deletions
+4
View File
@@ -22,6 +22,10 @@
<Compile Remove="src\**" />
<None Remove="src\**" />
<EmbeddedResource Remove="src\**" />
<!-- Testprojekt unter tests/ wird separat kompiliert (nicht in die App ziehen). -->
<Compile Remove="tests\**" />
<None Remove="tests\**" />
<EmbeddedResource Remove="tests\**" />
</ItemGroup>
<ItemGroup>