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