1 write to Storage
Aspire.Dashboard.Tests (1)
Shared\InMemoryBrowserLocalStorage.cs (1)
37Storage = new InterceptedLocalStorage(new LocalBrowserStorage(
29 references to Storage
Aspire.Dashboard.Tests (29)
Integration\StartupTests.cs (2)
105await browser.Storage.SetAsync("pins", pins); 110await browser.Storage.SetAsync("groups", new Dictionary<string, List<RelativeOrderMove>> { ["Tags"] = moves });
LocalBrowserStorageTests.cs (2)
36var snapshot = await browser.Storage.ReadUnprotectedSnapshotAsync( 64var snapshot = await browser.Storage.ReadUnprotectedSnapshotAsync([BrowserStorageKeys.ResourcePaneWidth]);
Model\LocalStorageSettingTests.cs (6)
24await browser.Storage.SetAsync<List<int>>(Key, [1]); 28await browser.Storage.SetUnprotectedAsync<List<int>>(Key, [1]); 60? await browser.Storage.GetAsync<List<int>>(Key) 61: await browser.Storage.GetUnprotectedAsync<List<int>>(Key); 97await browser.Storage.SetAsync<List<int>>(Key, [1]); 122new(browser.Storage, new LocalStorageLocks(), Key, NullLogger.Instance, protect, stored => stored?.ToList() ?? [], (x, y) => x.SequenceEqual(y), onChanged);
Model\MetricPinStoreTests.cs (4)
38Assert.True((await _browser.Storage.GetUnprotectedAsync<List<MetricPin>>(s_storageKey)).InvalidValue); 176await _browser.Storage.SetUnprotectedAsync<List<MetricPin>>(s_storageKey, [Pin("api", s_heap)]); 191await _browser.Storage.SetAsync<List<MetricPin>>(s_storageKey, [Pin("", s_heap), Pin("api", s_cpu)]); 218new(_browser.Storage, _locks, Options.Create(new DashboardOptions { ApplicationName = "TestApp" }), NullLogger<MetricPinStore>.Instance);
Model\ResourceOrderStoreTests.cs (12)
54var saved = Assert.Single((await _browser.Storage.GetAsync<List<RelativeOrderMove>>(s_resourceKey)).Value!); 56Assert.True((await _browser.Storage.GetUnprotectedAsync<List<RelativeOrderMove>>(s_resourceKey)).InvalidValue); 146var saved = (await _browser.Storage.GetAsync<List<RelativeOrderMove>>(s_resourceKey)).Value!; 165var savedResources = (await _browser.Storage.GetAsync<List<RelativeOrderMove>>(s_resourceKey)).Value!; 166var savedGroups = (await _browser.Storage.GetAsync<Dictionary<string, List<RelativeOrderMove>>>(s_groupKey)).Value!; 229var savedResources = (await _browser.Storage.GetAsync<List<RelativeOrderMove>>(s_resourceKey)).Value!; 230var savedGroups = (await _browser.Storage.GetAsync<Dictionary<string, List<RelativeOrderMove>>>(s_groupKey)).Value!; 249var saved = (await _browser.Storage.GetAsync<Dictionary<string, List<RelativeOrderMove>>>(s_groupKey)).Value!; 253Assert.True((await _browser.Storage.GetUnprotectedAsync<Dictionary<string, List<RelativeOrderMove>>>(s_groupKey)).InvalidValue); 295await _browser.Storage.SetUnprotectedAsync<List<RelativeOrderMove>>(s_resourceKey, 313await _browser.Storage.SetAsync<List<RelativeOrderMove>>(s_resourceKey, [first, second, first]); 343var store = new ResourceOrderStore(_browser.Storage, _locks,
Model\ResourceTagStoreTests.cs (3)
111Assert.True((await _browser.Storage.GetUnprotectedAsync<Dictionary<string, List<string>>>(s_storageKey)).InvalidValue); 307var otherApp = new ResourceTagStore(_browser.Storage, _locks, Options.Create(new DashboardOptions { ApplicationName = "Other App" }), NullLogger<ResourceTagStore>.Instance); 349new(_browser.Storage, _locks, Options.Create(new DashboardOptions { ApplicationName = "TestApp" }), NullLogger<ResourceTagStore>.Instance);