9 references to GetOrAdd
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (9)
Threading\CleanableWeakCacheTests.cs (9)
54
var result = cache.
GetOrAdd
(Key, value);
68
cache.
GetOrAdd
(Key, existingValue);
70
var result = cache.
GetOrAdd
(Key, newValue);
98
cache.
GetOrAdd
(Key, existingValue);
133
cache.
GetOrAdd
(Key, existingValue);
235
var result = cache.
GetOrAdd
(Key, newValue);
320
var result = cache.
GetOrAdd
(testKey, testValue);
369
Assert.Throws<ArgumentNullException>(() => cache.
GetOrAdd
(null!, value));
382
var result1 = cache.
GetOrAdd
("key1", (TestValue?)null);