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]; 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]; 120Host(0), Host(-1), Host(42) with { AppHostPath = "relative" }, 121Host(42) with { ProcessStartTimeUnixMilliseconds = 0 }, 122Host(42) with { AppHostPath = Path.GetFullPath("apphost.cs") + "\0" } 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); 142var hosts = Enumerable.Range(1, TrayCliProtocol.MaximumAppHosts).Select(Host).ToArray(); 144Assert.Throws<CliProtocolException>(() => Parse(Snapshot([.. hosts, Host(hosts.Length + 1)])));