public void WordFindAndReplaceTestMultiply() { var apiKey = new Dictionary <string, string>() { { "AppSecret", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }, { "AppId", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } }; var config = new Configuration(apiKey: apiKey); config.ApiClient = new ApiClient(config); var word = new WordApi(config); word.WordFindAndReplace("letterlegal5.doc", "letterlegal5_replace2.doc", new List <string> { "1", "2" }, new List <string> { "!", "!" }); var file = new FileApi(config); var result = file.FileList(); Assert.IsTrue(result.Contains("letterlegal5_replace2.doc")); }
public void FileListTestBasicAuth() { var config = new Configuration(username: "******", password: "******"); config.ApiClient = new ApiClient(config); var client = new FileApi(config); var result = client.FileList(); Assert.IsTrue(result.Any()); }
public void FileUploadTest() { var apiKey = new Dictionary <string, string>() { { "AppSecret", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }, { "AppId", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } }; var config = new Configuration(apiKey: apiKey); config.ApiClient = new ApiClient(config); var file = new FileApi(config); file.FileUploadPost("letterlegal5.doc", File.Open("D://Temp/letterlegal5.doc", FileMode.Open)); var result = file.FileList(); Assert.IsTrue(result.Contains("letterlegal5.doc")); }
public void WordMailMergeTest() { var apiKey = new Dictionary <string, string>() { { "AppSecret", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }, { "AppId", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } }; var config = new Configuration(apiKey: apiKey); config.ApiClient = new ApiClient(config); var word = new WordApi(config); word.WordMailMerge("template1.docx", "mailmerge.docx", "source3.txt"); var file = new FileApi(config); var result = file.FileList(); Assert.IsTrue(result.Contains("source3.txt")); }
public void WordTextWatermarkTest() { var apiKey = new Dictionary <string, string>() { { "AppSecret", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }, { "AppId", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } }; var config = new Configuration(apiKey: apiKey); config.ApiClient = new ApiClient(config); var word = new WordApi(config); word.WordTextWatermark("letterlegal5.doc", "letterlegal5_watermark.doc", "Hello World"); var file = new FileApi(config); var result = file.FileList(); Assert.IsTrue(result.Contains("letterlegal5_watermark.doc")); }
public void WordImageWatermarkPostTest() { var apiKey = new Dictionary <string, string>() { { "AppSecret", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }, { "AppId", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } }; var config = new Configuration(apiKey: apiKey); config.ApiClient = new ApiClient(config); var stream = File.Open("D://Temp/temp.png", FileMode.Open); var word = new WordApi(config); word.WordImageWatermarkPost("letterlegal5.doc", "letterlegal5_image_watermark.doc", stream); var file = new FileApi(config); var result = file.FileList(); Assert.IsTrue(result.Contains("letterlegal5_image_watermark.doc")); }