16 references to Snapshot
Aspire.Tray.Tests (16)
CliAppHostClientTests.cs (4)
63using var cli = new FixtureCli($"printf '%s\\n' '{Snapshot(Host(42))}'"); 101printf '%s\n' '{{Snapshot(Host(42))}}' 150printf '%s\n' '{{Snapshot(Host(43))}}' 154printf '%s\n' '{{Snapshot(Host(42))}}'
CliProtocolTests.cs (12)
22var first = Parse(Snapshot(Host(42), Host(43))); 23var second = Parse(Snapshot(Host(43) with { DashboardUrl = "https://localhost:5678/" })); 32var original = Parse(Snapshot(Host(42))).AppHosts[0]; 47var original = Assert.Single(Parse(Snapshot(Host(42))).AppHosts); 48var updated = Assert.Single(Parse(Snapshot(Host(42) with { Health = health })).AppHosts); 71var host = Parse(Snapshot(Host(42))).AppHosts[0]; 126Assert.Throws<CliProtocolException>(() => Parse(Snapshot(host))); 128Assert.Throws<CliProtocolException>(() => Parse(Snapshot(Host(42), Host(42)))); 129Assert.Throws<CliProtocolException>(() => Parse(Snapshot(Host(42), Host(42) with { AppHostPath = Path.GetFullPath("other.cs") }))); 135var host = Assert.Single(Parse(Snapshot(Host(42) with { ProcessStartTimeUnixMilliseconds = null })).AppHosts); 143Assert.Equal(TrayCliProtocol.MaximumAppHosts, Parse(Snapshot(hosts)).AppHosts.Count); 144Assert.Throws<CliProtocolException>(() => Parse(Snapshot([.. hosts, Host(hosts.Length + 1)])));