ModernUO/Projects/UOContent.Tests
Kamron Batman 30d1542868 refactor(spawners): import via typed polymorphic deserialization with cleanup
- Add ImportLocation/ImportMap read-only accessors to BaseSpawner.Json.cs
  exposing _jsonLocation/_jsonMap for the importer post-STJ-deserialization.
- Rewrite ImportJsonSpawners to deserialize List<BaseSpawner> directly via
  SpawnerJsonSerializer.Options (polymorphic on $type), eliminating
  DynamicJson + AssemblyHandler.FindTypeByName + CreateInstance<ISpawner>.
- Enforce cleanup contract: every deserialized spawner (registered in World
  at Map.Internal by STJ) is either MoveToWorld'd or Delete()'d — map==null/
  Internal guard Deletes, inner catch Deletes on placement failure.
- Add internal ImportFile seam for testability (from=null safe; only used in
  JsonException path which valid files never hit).
- Add ImportCleanupTests: valid placement, no-map orphan rejected, duplicate
  location replaced — all with rigorous finally cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:04:01 -07:00
..
Fixtures feat(spawners): add SpawnerJsonSerializer + typed JSON binding for Spawner 2026-06-25 10:27:55 -07:00
Tests refactor(spawners): import via typed polymorphic deserialization with cleanup 2026-06-25 11:04:01 -07:00
UOContent.Tests.csproj fix: Bumps dependencies (#2472) 2026-06-07 01:25:21 -07:00