1 write to _console
Microsoft.Extensions.SecretManager.Tools.Tests (1)
SecretManagerTests.cs (1)
30
_console
= new TestConsole(output);
43 references to _console
Microsoft.Extensions.SecretManager.Tools.Tests (43)
SecretManagerTests.cs (43)
35
return new Program(
_console
, Directory.GetCurrentDirectory());
47
Assert.Contains(Resources.FormatError_ProjectMissingId(project),
_console
.GetOutput());
57
Assert.Contains(Resources.FormatError_ProjectFailedToLoad(project),
_console
.GetOutput());
67
Assert.Contains(Resources.FormatError_ProjectPath_NotFound(projectPath),
_console
.GetOutput());
76
var secretManager = new Program(
_console
, cwd);
80
Assert.Contains(Resources.FormatMessage_Project_File_Path(Path.Combine(cwd, "..", "TestProject.csproj")),
_console
.GetOutput());
102
var secretManager = new Program(
_console
, dir);
116
_console
.GetOutput());
119
_console
.ClearOutput();
128
_console
.GetOutput());
132
_console
.ClearOutput();
142
_console
.ClearOutput();
147
Assert.Contains(Resources.Error_No_Secrets_Found,
_console
.GetOutput());
157
Assert.Contains("Successfully saved secret1 to the secret store.",
_console
.GetOutput());
159
Assert.Contains("Successfully saved secret1 to the secret store.",
_console
.GetOutput());
161
_console
.ClearOutput();
164
Assert.Contains("secret1 = value2",
_console
.GetOutput());
175
Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Project file path {0}.", Path.Combine(projectPath, "TestProject.csproj")),
_console
.GetOutput());
176
Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Secrets file path {0}.", PathHelper.GetSecretsPathFromSecretsId(secretId)),
_console
.GetOutput());
177
Assert.Contains("Successfully saved secret1 to the secret store.",
_console
.GetOutput());
178
_console
.ClearOutput();
182
Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Project file path {0}.", Path.Combine(projectPath, "TestProject.csproj")),
_console
.GetOutput());
183
Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Secrets file path {0}.", PathHelper.GetSecretsPathFromSecretsId(secretId)),
_console
.GetOutput());
184
Assert.Contains("secret1 = value1",
_console
.GetOutput());
193
Assert.Contains("Cannot find 'secret1' in the secret store.",
_console
.GetOutput());
203
Assert.Contains("SeCreT1 = value",
_console
.GetOutput());
206
_console
.ClearOutput();
209
Assert.Contains(Resources.Error_No_Secrets_Found,
_console
.GetOutput());
222
Assert.Contains("AzureAd:ClientSecret = abcd郩˙î",
_console
.GetOutput());
233
var secretManager = new Program(
_console
, Path.GetDirectoryName(projectPath));
235
var stdout =
_console
.GetOutput();
253
Assert.Contains("AzureAd:ClientSecret = ¡™£¢∞",
_console
.GetOutput());
267
Assert.Contains(Resources.Error_No_Secrets_Found,
_console
.GetOutput());
281
var secretManager = new Program(
_console
, dir);
303
_console
.GetOutput());
307
_console
.ClearOutput();
316
_console
.GetOutput());
320
_console
.ClearOutput();
326
Assert.Contains(Resources.Error_No_Secrets_Found,
_console
.GetOutput());
334
var secretManager = new Program(
_console
, projectPath);
338
Assert.DoesNotContain(Resources.FormatError_ProjectMissingId(project),
_console
.GetOutput());
339
Assert.DoesNotContain("--help",
_console
.GetOutput());
347
var secretManager = new Program(
_console
, projectPath);