public void SubFolder1LevelExecute() { var cmd = new AddFileCmdlet { SiteUrl = SiteUrl, Username = Username, Password = Password, SourceFile = new FileInfo("files\\document1.docx"), RelativeDocLibUrl = RelativeDocLibUrl + "/Folder1-1" }; var result = cmd.Invoke(); Debug.WriteLine("***** Executing {0} at {1}", cmd.GetType(), DateTime.Now); foreach (var line in result) Debug.WriteLine("- {0}", line); Debug.WriteLine("***** Finished {0} at {1}", cmd.GetType(), DateTime.Now); }
public void SimpleFileExecute() { var cmd = new AddFileCmdlet { SiteUrl = OnPremTestContext.SiteUrl, Username = OnPremTestContext.Username, Password = OnPremTestContext.Password, SourceFile = new FileInfo("files\\document1.docx"), RelativeDocLibUrl = OnPremTestContext.RelativeDocLibUrl }; var result = cmd.Invoke(); Debug.WriteLine("***** Executing {0} at {1}", cmd.GetType(), DateTime.Now); foreach (var line in result) Debug.WriteLine("- {0}", line); Debug.WriteLine("***** Finished {0} at {1}", cmd.GetType(), DateTime.Now); }
public void SubFolder2LevelExecute() { var cmd = new AddFileCmdlet { SiteUrl = OnPremTestContext.SiteUrl, Username = OnPremTestContext.Username, Password = OnPremTestContext.Password, SourceFile = new FileInfo("files\\document1.docx"), RelativeDocLibUrl = OnPremTestContext.RelativeDocLibUrl + "/Folder2-1/Folder2-2", NoOverwrite = false, AddUpdateOnly = false }; var result = cmd.Invoke(); Debug.WriteLine("***** Executing {0} at {1}", cmd.GetType(), DateTime.Now); foreach (var line in result) Debug.WriteLine("- {0}", line); Debug.WriteLine("***** Finished {0} at {1}", cmd.GetType(), DateTime.Now); }
public void SimpleDirectoryExecute() { var cmd = new AddFileCmdlet { SiteUrl = SiteUrl, Username = Username, Password = Password, SourceDirectory = new DirectoryInfo("files"), RelativeDocLibUrl = RelativeDocLibUrl }; var result = cmd.Invoke(); Debug.WriteLine("***** Executing {0} at {1}", cmd.GetType(), DateTime.Now); foreach (var line in result) Debug.WriteLine("- {0}", line); Debug.WriteLine("***** Finished {0} at {1}", cmd.GetType(), DateTime.Now); }
public void NoInputFileExecute() { var cmd = new AddFileCmdlet { SiteUrl = SiteUrl, Username = Username, Password = Password, RelativeDocLibUrl = RelativeDocLibUrl }; var result = cmd.Invoke(); Debug.WriteLine("***** Executing {0} at {1}", cmd.GetType(), DateTime.Now); foreach (var line in result) Debug.WriteLine("- {0}", line); Debug.WriteLine("***** Finished {0} at {1}", cmd.GetType(), DateTime.Now); }