C# tests: read "echoed" from how the refusal introduces the header, since it also names the readable formats
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3f33445d84
commit
eb79b21e51
1 changed files with 3 additions and 1 deletions
|
|
@ -160,7 +160,9 @@ namespace GameCult.Caching.Tests
|
|||
var refusal = Assert.Throws<CultStoreUnreadableException>(() =>
|
||||
CultCacheMessagePack.Create(path, new CultCacheOpenOptions { Registry = Registry, UseDirectoryStore = directoryStore }))!;
|
||||
|
||||
Assert.That(refusal.Message.Contains(header, StringComparison.Ordinal), Is.EqualTo(echoed), refusal.Message);
|
||||
// The readable formats are named in the same message, so "echoed" is read from how the header is introduced.
|
||||
Assert.That(refusal.Message.Contains(" is " + header + ";", StringComparison.Ordinal) || refusal.Message.Contains("format " + header + " is not readable", StringComparison.Ordinal), Is.EqualTo(echoed), refusal.Message);
|
||||
Assert.That(refusal.Message.Contains("an unrecognised cultcache.store.* header of ", StringComparison.Ordinal), Is.EqualTo(!echoed), refusal.Message);
|
||||
Assert.That(refusal.Message.Contains("SECRETHDR", StringComparison.Ordinal), Is.False, refusal.Message);
|
||||
if (!echoed)
|
||||
Assert.That(refusal.Message.Contains("٣", StringComparison.Ordinal), Is.False, refusal.Message);
|
||||
|
|
|
|||
Loading…
Reference in a new issue