7 references to GetOrAdd
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (7)
Threading\CleanableWeakCacheTests.cs (7)
84
var result = cache.
GetOrAdd
(Key, () => expectedValue);
100
var result = cache.
GetOrAdd
(Key, () =>
308
cache.
GetOrAdd
(key, () => new TestValue("Factory"));
338
return cache.
GetOrAdd
(Key, () =>
370
Assert.Throws<ArgumentNullException>(() => cache.
GetOrAdd
(null!, () => value));
383
var result2 = cache.
GetOrAdd
("key2", () => null);
445
cache.
GetOrAdd
(Key, () => throw expectedException));