23 references to Host
Aspire.Tray.Tests (23)
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 (19)
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]; 121Host(0), Host(-1), Host(42) with { AppHostPath = "relative" }, 122Host(42) with { ProcessStartTimeUnixMilliseconds = 0 }, 123Host(42) with { AppHostPath = Path.GetFullPath("apphost.cs") + "\0" } 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); 143var hosts = Enumerable.Range(1, TrayCliProtocol.MaximumAppHosts).Select(Host).ToArray(); 145Assert.Throws<CliProtocolException>(() => Parse(Snapshot([.. hosts, Host(hosts.Length + 1)])));