Route every real-catalog test reader through TestCatalog
Deletes the direct GameData/Aetheria.cc opens (FireControlCut124Tests x3, FireControlCut7Tests, MiningCut3Tests x2, RestoredHullsTests x11) in favour of TestCatalog.Repo, and the eight copies of the shipped-assembly registry in favour of TestCatalog.Registry() (real-catalog-readers-bypass). Pirates and Roles command tests keep copying the shipped catalog (they rewrite a copy through AetherDb) and take only the registry. Builds; not yet run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
da4d8c6c96
commit
d6100b18ca
6 changed files with 26 additions and 44 deletions
|
|
@ -25,9 +25,7 @@ public sealed class PiratesFactionCommandTests : IDisposable
|
|||
// AetherDb.Open composes the process-wide registry, which in this test host also sees this assembly's TestCatalogGlobal
|
||||
// (see FireControlCut7Tests). So the copy is stripped through a registry scoped to the shipped assembly and then given
|
||||
// the record that registry's shared sibling demands, as AetheriaStoresTests does.
|
||||
var registry = CultDocumentRegistry.ForTypes(typeof(ItemData).Assembly.GetTypes()
|
||||
.Where(t => t is { IsAbstract: false, IsInterface: false })
|
||||
.Where(t => t.GetCustomAttribute<CultDocumentAttribute>() != null));
|
||||
var registry = TestCatalog.Registry();
|
||||
using (var cache = new CultCache(registry))
|
||||
{
|
||||
cache.AddBackingStore(new SingleFileMessagePackBackingStore(CatalogPath), AetheriaStores.CatalogTypes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue