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