public static ICodeFile CreateCodeMgr(CodeMgr mgr) { ICodeFile result = null; if (mgr.Type == UserTypeEnum.SVN) { result = new SVNCode(mgr.Source, mgr.Target, IdentityKey.CreateIdentityKey(mgr.UserName, mgr.Pwd, RTypeEnum.SVN)); } return(result); }
public void CloneTest() { var target = @"D:\test\bBA"; var key = IdentityKey.CreateIdentityKey("konghao", "111111", RTypeEnum.SVN); ICodeFile svn = new SVNCode("https://DESKTOP-1O16UC8/svn/AutoTest/", target, key); var log = svn.Clone().Log; var dir = new DirectoryInfo(target); if (dir.GetDirectories().Count() == 0) { Assert.Fail(log); } else { Debug.WriteLine(log); } }