public static ToSecureString ( this unsecureString ) : SecureString | ||
unsecureString | this | |
return | SecureString |
public void Initialize() { string asmDir = PathEx.GetDirectoryName(typeof(GitTests).Assembly.Location); this.rootDir = PathEx.Combine(asmDir, "test-root"); DirectoryEx.Create(this.rootDir); DirectoryEx.Clear(this.rootDir); if (FileEx.Exists(credentialsFilePath)) { var lines = File.ReadAllLines(credentialsFilePath); this.userName = lines[0]; this.password = SecureStringExtensions.ToSecureString(lines[1]); } var fileOps = new TestFileOperationsExecuter(Path.Combine(this.rootDir, "agent")); //var fileOps = new SimulatedFileOperationsExecuter(fileOps); //fileOps.MessageLogged += (s, e) => TestLogger.Instance.Log(e.Level, e.Message); this.fileOps = fileOps; this.processExecuter = new TestRemoteProcessExecuter(); this.jobExecuter = new TestRemoteJobExecuter(); }
public void ToSecureString_ValueNull_ThrowsArgumentNullException() { Assert.Equal("value", Assert.Throws <ArgumentNullException>(() => SecureStringExtensions.ToSecureString(null)).ParamName); }