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