CanCreateRemotePath() public méthode

Determines whether this instance can create remote path for specified localFile.
public CanCreateRemotePath ( DirectoryInfo localDirectory ) : bool
localDirectory System.IO.DirectoryInfo Local directory.
Résultat bool
        public void RootFolderMatchesItselfWithoutTrailingDenominator()
        {
            var matcher = new PathMatcher(Path.GetTempPath().TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar.ToString(), "/");

            Assert.That(matcher.CanCreateRemotePath(Path.GetTempPath().TrimEnd(Path.DirectorySeparatorChar)), Is.True);
        }
 public void CanCreateRemotePathTest()
 {
     string local = Path.Combine(this.localpath, "test");
     string wrong = Path.Combine("wrong", "path", "on", "client", "test");
     var matcher = new PathMatcher(this.localpath, this.remotepath);
     Assert.IsTrue(matcher.CanCreateRemotePath(this.localpath));
     Assert.IsTrue(matcher.CanCreateRemotePath(local));
     Assert.IsFalse(matcher.CanCreateRemotePath(wrong));
     var localFolder = new DirectoryInfo(Path.Combine(this.localpath, "test2"));
     Assert.IsTrue(matcher.CanCreateRemotePath(localFolder));
     var wrongFolder = new DirectoryInfo(wrong);
     Assert.IsFalse(matcher.CanCreateRemotePath(wrongFolder));
 }