72 references to TestCommandStrings
aspire (53)
Commands\TestCommand.cs (32)
32
private static readonly Option<bool> s_noBuildOption = new("--no-build") { Description =
TestCommandStrings
.NoBuildArgumentDescription };
34
internal static readonly Option<OutputFormat> s_formatOption = new("--format") { Description =
TestCommandStrings
.FormatDescription };
35
internal static readonly Option<bool> s_keepAliveOption = new("--keep-alive") { Description =
TestCommandStrings
.KeepAliveDescription };
36
private static readonly Option<string?> s_timeoutSecondsOption = new("--timeout-seconds") { Description =
TestCommandStrings
.TimeoutSecondsDescription };
52
: base("test",
TestCommandStrings
.Description, services)
81
var invalid = CommandResult.Failure(CliExitCodes.InvalidCommand,
TestCommandStrings
.IncompatibleOptions);
92
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.InvalidTimeoutSeconds, MaximumTimeoutSeconds));
104
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.InvalidStartupTimeout, CliConfigNames.AppHostStartupTimeout));
142
TestCommandStrings
.AppHostExitedEarly);
147
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.TimeoutWaitingForAppHost,
153
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.ArtifactFailure, ex.Message));
169
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.CommandTimedOut, commandTimeoutSeconds));
184
var error = string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.ArtifactFailure, ex.Message);
222
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
TestCommandStrings
.UnrecognizedAppHost);
234
InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight,
TestCommandStrings
.IsolatedModeRunningInstanceWarning);
297
var backchannel = await InteractionService.ShowStatusAsync(
TestCommandStrings
.ConnectingToAppHost, async () =>
307
dashboard = await InteractionService.ShowStatusAsync(
TestCommandStrings
.StartingDashboard, async () =>
323
InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight,
TestCommandStrings
.DashboardFailedToStart);
338
InteractionService.DisplayMessage(KnownEmojis.Information, $"{
TestCommandStrings
.RecentAppHostStartupOutput}:");
395
InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight,
TestCommandStrings
.LogCaptureFailed);
472
return CommandResult.Failure(CliExitCodes.AppHostIncompatible,
TestCommandStrings
.AppHostIncompatible);
481
return CommandResult.Failure(CliExitCodes.TestRunFailed,
TestCommandStrings
.AppHostExitedEarly);
488
InteractionService.DisplaySubtleMessage(
TestCommandStrings
.KeepAliveMessage);
503
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.ShutdownTimeout, GracefulShutdownBudget.TotalSeconds));
516
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.AppHostExitedWithCode, exitCode));
525
string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.ArtifactFailure, ex.Message));
552
throw new ConnectionLostException(
TestCommandStrings
.KeepAliveDisconnected);
574
console.DisplaySubtleMessage($"{
TestCommandStrings
.AppHost.EscapeMarkup()}: {appHostRelativePath.EscapeMarkup()}", allowMarkup: true);
578
console.DisplayRenderable(new Markup($"[dim]{
TestCommandStrings
.Dashboard.EscapeMarkup()}: " +
582
console.DisplayRenderable(new Markup($"[dim]{
TestCommandStrings
.Dashboard.EscapeMarkup()}: {MarkupHelpers.SafeLink(console, codespacesUrl)}[/]{Environment.NewLine}"));
585
console.DisplaySubtleMessage($"{
TestCommandStrings
.Logs.EscapeMarkup()}: {MarkupHelpers.SafeFileLink(console, logFilePath)}", allowMarkup: true);
803
private sealed class TestAppHostExitedException(int exitCode) : Exception(
TestCommandStrings
.AppHostExitedEarly)
Resources\TestCommandStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.TestCommandStrings", typeof(
TestCommandStrings
).Assembly);
Testing\TestRunReporter.cs (20)
92
interaction.DisplayMessage(KnownEmojis.Microscope,
TestCommandStrings
.RunningHeader);
94
TestCommandStrings
.OutputDirectory, MarkupHelpers.SafeFileLink(interaction, outputPath)), allowMarkup: true);
190
TestCommandStrings
.PublishedResult, FormatResourceName(result.ResourceName),
290
? string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.TerminalResourceStatus,
292
resource.ExitCode?.ToString(CultureInfo.CurrentCulture) ??
TestCommandStrings
.UnknownExitCode)
293
: string.Format(CultureInfo.CurrentCulture,
TestCommandStrings
.ResourceStatus,
326
complete ?
TestCommandStrings
.ResourceResults :
TestCommandStrings
.PartialResourceResults,
416
TestCommandStrings
.SummaryHeader, FormatOutcome(status)), allowMarkup: true);
421
TestCommandStrings
.PublishedSummary, FormatCount(totals.Passed, "green"),
427
TestCommandStrings
.SummaryFile, MarkupHelpers.SafeFileLink(_interaction, SummaryPath)), allowMarkup: true);
565
"passed" =>
TestCommandStrings
.Passed,
566
"failed" =>
TestCommandStrings
.Failed,
567
"cancelled" =>
TestCommandStrings
.Cancelled,
568
"timedOut" =>
TestCommandStrings
.TimedOut,
569
"incomplete" =>
TestCommandStrings
.Incomplete,
570
"skipped" =>
TestCommandStrings
.Skipped,
571
"inconclusive" =>
TestCommandStrings
.Inconclusive,
572
"error" =>
TestCommandStrings
.Error,
573
_ =>
TestCommandStrings
.Pending
Aspire.Cli.Tests (19)
Commands\TestCommandTests.cs (17)
419
Assert.Contains(
TestCommandStrings
.AppHostExitedEarly, interaction.DisplayedErrors);
503
Assert.Equal(
TestCommandStrings
.IncompatibleOptions, json["error"]!.GetValue<string>());
553
if (!json && message.StartsWith(
TestCommandStrings
.SummaryFile.Replace("{0}", "", StringComparison.Ordinal), StringComparison.Ordinal))
780
Assert.Contains(
TestCommandStrings
.KeepAliveDisconnected, final["error"]!.GetValue<string>());
800
var expected = $"{
TestCommandStrings
.AppHost}: AppHost [test].csproj{Environment.NewLine}";
803
expected += $"{
TestCommandStrings
.Dashboard}: {dashboard ?? "N/A"}{Environment.NewLine}";
806
expected += $"{
TestCommandStrings
.Dashboard}: {codespaces}{Environment.NewLine}";
809
expected += $"{
TestCommandStrings
.Logs}: {logPath}{Environment.NewLine}";
848
$"{
TestCommandStrings
.AppHost}: AppHost.csproj{Environment.NewLine}" +
849
$"{
TestCommandStrings
.Dashboard}: {dashboard}{Environment.NewLine}" +
850
$"{
TestCommandStrings
.Dashboard}: {codespaces}{Environment.NewLine}" +
851
$"{
TestCommandStrings
.Logs}: {logPath}{Environment.NewLine}", stdout.ToString());
853
[$"{
TestCommandStrings
.AppHost}: AppHost.csproj", $"{
TestCommandStrings
.Logs}: {MarkupHelpers.SafeFileLink(interaction, logPath)}"],
1155
Assert.Equal(string.Format(
TestCommandStrings
.InvalidStartupTimeout, CliConfigNames.AppHostStartupTimeout),
1184
Assert.Equal(string.Format(
TestCommandStrings
.InvalidTimeoutSeconds, TestCommand.MaximumTimeoutSeconds),
1312
Assert.Equal(string.Format(
TestCommandStrings
.CommandTimedOut, 10), persisted["error"]!.GetValue<string>());
Testing\TestRunReporterTests.cs (2)
201
Assert.Contains(interaction.DisplayedMessages, message => message.Message ==
TestCommandStrings
.RunningHeader);
305
var displayOutcome = outcome == "timedOut" ?
TestCommandStrings
.TimedOut : outcome;