Path: redb/redb.Tests.Integration/Tests/Unit/GlobalMetadataCacheClrTypeTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/Unit/GlobalMetadataCacheClrTypeTests.cs ---- using redb.Core.Caching; using redb.Core.Models.Entities; namespace redb.Tests.Integration.Tests.Unit; public class GlobalMetadataCacheClrTypeTests { /// /// A scheme this domain already holds and no loaded type answers to is a scheme without a CLR type. Asking the /// provider for it again loaded the same scheme on every call: a list of 200 items of such a scheme was 200 scheme /// queries. No provider is given here - a call into it is the failure. /// [Fact] public async Task AKnownSchemeWithoutAClrType_IsAnsweredFromTheCache() { var cache = new GlobalMetadataCache($"unit-clr-{Guid.NewGuid():N}"); var scheme = new RedbScheme { Id = 424242, Name = $"unit.no.such.type.{Guid.NewGuid():N}" }; cache.CacheScheme(scheme); (await cache.ResolveClrTypeAsync(scheme.Id, schemeProvider: null!)).Should().BeNull(); cache.ResolveClrType(scheme.Id, schemeProvider: null!).Should().BeNull(); } }