1 write to RecentAppHosts
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\TrayController.cs (1)
643RecentAppHosts = recent,
54 references to RecentAppHosts
Aspire.Tray.Tests (54)
TrayControllerPinPruningTests.cs (10)
39Assert.Equal(new AppHostInfo(recent, 0, null).Id, Assert.Single(controller.State.RecentAppHosts).Id); 69Assert.Empty(controller.State.RecentAppHosts); 102Assert.Empty(controller.State.RecentAppHosts); 125Assert.Empty(controller.State.RecentAppHosts); 148Assert.Equal(new AppHostInfo(path, 0, null).Id, Assert.Single(controller.State.RecentAppHosts).Id); 152Assert.Empty(controller.State.RecentAppHosts); 185Assert.Empty(controller.State.RecentAppHosts); 252Assert.Single(controller.State.RecentAppHosts, host => host.Id == new AppHostInfo(restricted, 0, null).Id).Subtitle); 254Assert.Single(controller.State.RecentAppHosts, host => host.Id == new AppHostInfo(deleted, 0, null).Id).Subtitle); 280Assert.Empty(controller.State.RecentAppHosts);
TrayControllerPreferencesTests.cs (6)
108Assert.Equal(10, controller.State.RecentAppHosts.Count); 121Assert.Single(controller.State.RecentAppHosts); 153Assert.Equal(paths.Take(limit).Select(IdentityPath), controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 161Assert.Empty(controller.State.RecentAppHosts); 183Assert.Empty(controller.State.RecentAppHosts); 202Assert.Empty(controller.State.RecentAppHosts);
TrayControllerSavedStateTests.cs (38)
41await WaitForStateAsync(controller, state => state.AppHosts.Concat(state.RecentAppHosts).Any(row => row.CanStart)); 42var row = Assert.Single(controller.State.AppHosts.Concat(controller.State.RecentAppHosts)); 52row = Assert.Single(controller.State.AppHosts.Concat(controller.State.RecentAppHosts)); 79await WaitForStateAsync(controller, state => state.RecentAppHosts.SingleOrDefault()?.Error == 81Assert.False(Assert.Single(controller.State.RecentAppHosts).CanStart); 92Assert.Empty(controller.State.RecentAppHosts); 111await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 0); 117Assert.Empty(controller.State.RecentAppHosts); 140await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 0); 146var row = Assert.Single(controller.State.RecentAppHosts); 198Assert.Equal(recent, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 205Assert.True(Assert.Single(controller.State.RecentAppHosts).CanStart); 228Assert.Empty(controller.State.RecentAppHosts); 248Assert.Empty(controller.State.RecentAppHosts); 256Assert.Empty(controller.State.RecentAppHosts); 262Assert.Equal(path, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 280Assert.Empty(controller.State.RecentAppHosts); 287Assert.Equal(first.Id.AppHostPath, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 317Assert.Empty(controller.State.RecentAppHosts); 323Assert.Equal(host.Id.AppHostPath, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 344controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 349controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 354controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 371await WaitForStateAsync(controller, state => state.RecentAppHosts.Single().Error is not null); 372var timedOut = Assert.Single(controller.State.RecentAppHosts); 385Assert.Empty(controller.State.RecentAppHosts); 406Assert.All(controller.State.RecentAppHosts, row => 415await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 1); 416Assert.Equal(IdentityPath(second), Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 422Assert.Equal(IdentityPath(second), Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 443Assert.Empty(controller.State.RecentAppHosts); 486await WaitForStateAsync(controller, state => state.RecentAppHosts[0].Error is not null); 487Assert.Equal("Unable to start AppHost.", Assert.Single(controller.State.RecentAppHosts).Error); 488Assert.True(controller.State.RecentAppHosts[0].CanStart); 492Assert.Null(Assert.Single(controller.State.RecentAppHosts).Error); 494await WaitForStateAsync(controller, state => state.RecentAppHosts[0].Error is not null); 496Assert.Single(controller.State.RecentAppHosts).Error); 497Assert.False(controller.State.RecentAppHosts[0].CanStart);