1 write to CliPath
Aspire.Tray.Tests (1)
Helpers\TestTrayBundle.cs (1)
17
CliPath
= Path.Combine(_directory.FullName, "aspire cli");
34 references to CliPath
Aspire.Tray.Tests (34)
Helpers\TestTrayBundle.cs (1)
19
File.WriteAllText(
CliPath
, "");
TrayLaunchCommandTests.cs (15)
14
var options = TrayOptions.Parse(["--cli", bundle.
CliPath
, "--bundle-root", bundle.Root]);
25
"--cli", bundle.
CliPath
, "--bundle-root", bundle.Root
36
new(bundle.
CliPath
, null, bundle.Root, null)));
46
new(bundle.
CliPath
, null, bundle.Root, null)));
53
Assert.Equal(new(bundle.
CliPath
, null, null, null), TrayOptions.Parse(["--cli", bundle.
CliPath
]));
63
Assert.Throws<ArgumentException>(() => TrayOptions.Parse(["--cli", bundle.
CliPath
, option, value]));
71
"--cli", bundle.
CliPath
, "--bundle-root", bundle.Root, "--smoke-seconds", "20"]));
81
? ["--cli", bundle.
CliPath
, "--smoke-interactive", "--smoke-seconds", "120"]
82
: ["--cli", bundle.
CliPath
, "--smoke-seconds", "120", "--smoke-interactive"]);
94
Assert.False(TrayOptions.Parse(["--cli", bundle.
CliPath
]).InteractiveSmoke);
95
Assert.False(TrayOptions.Parse(["--cli", bundle.
CliPath
, "--smoke-seconds", "1"]).InteractiveSmoke);
103
Assert.Throws<ArgumentException>(() => TrayOptions.Parse(["--cli", bundle.
CliPath
, "--smoke-interactive"])).Message);
105
"--cli", bundle.
CliPath
, "--smoke-seconds", "120", "--smoke-interactive", "--smoke-interactive"]));
107
"--cli", bundle.
CliPath
, "--bundle-root", bundle.Root, "--smoke-seconds", "120", "--smoke-interactive"]));
TrayStartupOptionsTests.cs (10)
20
var options = TrayOptions.Parse(["--cli", bundle.
CliPath
, "--bundle-root", bundle.Root, "--startup-cli", startup]);
21
Assert.Equal(bundle.
CliPath
, options.CliPath);
26
var expected = new[] { "--cli", bundle.
CliPath
, "--bundle-root", bundle.Root, "--startup-cli", startup };
34
Assert.Null(TrayOptions.Parse(["--cli", bundle.
CliPath
]).StartupCliPath);
35
Assert.Throws<ArgumentException>(() => TrayOptions.Parse(["--cli", bundle.
CliPath
, "--startup-cli", "relative"]));
37
"--cli", bundle.
CliPath
, "--startup-cli", bundle.
CliPath
, "--startup-cli", bundle.
CliPath
]));
39
"--cli", bundle.
CliPath
, "--startup-cli", bundle.
CliPath
, "--smoke-seconds", "1"]));
WindowsTrayLaunchCommandTests.cs (8)
18
var start = TrayLaunchCommand.CreateWindowsStartInfo(new(bundle.
CliPath
, null, bundle.Root, null));
27
Assert.Equal(new[] { "--cli", bundle.
CliPath
, "--bundle-root", bundle.Root }, start.ArgumentList);
35
TrayLaunchCommand.CreateWindowsStartInfo(new(bundle.
CliPath
, null, bundle.Root, null)));
44
File.Delete(bundle.
CliPath
);
47
TrayLaunchCommand.CreateWindowsStartInfo(new(bundle.
CliPath
, null, bundle.Root, null)));
48
Assert.Equal(bundle.
CliPath
, error.FileName);
56
TrayLaunchCommand.CreateWindowsStartInfo(new(bundle.
CliPath
, null, null, null)));
58
TrayLaunchCommand.CreateWindowsStartInfo(new(bundle.
CliPath
, 1, bundle.Root, null)));