Caching tests: register the shared valid store's record type
The open verdict for v3-base.msgpack needs a cache that knows vectors.item. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4b3c76e418
commit
5d1fc496d7
1 changed files with 10 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GameCult.Caching.MessagePack;
|
using GameCult.Caching.MessagePack;
|
||||||
|
using MessagePack;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using static GameCult.Caching.Tests.ElementIdTests;
|
using static GameCult.Caching.Tests.ElementIdTests;
|
||||||
|
|
||||||
|
|
@ -116,5 +117,14 @@ namespace GameCult.Caching.Tests
|
||||||
Assert.That(() => cache.Commit(batch => batch.Upsert(typeof(IdDeck), new IdDeck { Name = "e" }, new CultRecordKey("e"))), Throws.Exception);
|
Assert.That(() => cache.Commit(batch => batch.Upsert(typeof(IdDeck), new IdDeck { Name = "e" }, new CultRecordKey("e"))), Throws.Exception);
|
||||||
Assert.That(File.ReadAllBytes(path), Is.EqualTo(bytes), "a file this runtime cannot read was rewritten");
|
Assert.That(File.ReadAllBytes(path), Is.EqualTo(bytes), "a file this runtime cannot read was rewritten");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The record type of the shared valid store (v3-base.msgpack: alpha and beta), so a cache can open it.
|
||||||
|
[CultDocument("vectors.item", "vectors.item.v1")]
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class VectorItem
|
||||||
|
{
|
||||||
|
[Key(0)] [CultName] public string Name { get; set; } = "";
|
||||||
|
[Key(1)] public int Count { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue