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]; 48var original = Assert.Single(Parse(Snapshot(Host(42))).AppHosts); 49var updated = Assert.Single(Parse(Snapshot(Host(42) with { Health = health })).AppHosts); 72var host = Parse(Snapshot(Host(42))).AppHosts[0]; 127Assert.Throws<CliProtocolException>(() => Parse(Snapshot(host))); 129Assert.Throws<CliProtocolException>(() => Parse(Snapshot(Host(42), Host(42)))); 130Assert.Throws<CliProtocolException>(() => Parse(Snapshot(Host(42), Host(42) with { AppHostPath = Path.GetFullPath("other.cs") }))); 136var host = Assert.Single(Parse(Snapshot(Host(42) with { ProcessStartTimeUnixMilliseconds = null })).AppHosts); 144Assert.Equal(TrayCliProtocol.MaximumAppHosts, Parse(Snapshot(hosts)).AppHosts.Count); 145Assert.Throws<CliProtocolException>(() => Parse(Snapshot([.. hosts, Host(hosts.Length + 1)])));