SftpClientTest.cs 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Sftp;
  3. using Renci.SshNet.Tests.Common;
  4. using Renci.SshNet.Tests.Properties;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. using System.Security.Cryptography;
  9. using System.Text;
  10. namespace Renci.SshNet.Tests.Classes
  11. {
  12. /// <summary>
  13. /// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
  14. /// </summary>
  15. [TestClass]
  16. public partial class SftpClientTest : TestBase
  17. {
  18. /// <summary>
  19. ///A test for SftpClient Constructor
  20. ///</summary>
  21. [TestMethod]
  22. [Ignore] // placeholder for actual test
  23. public void SftpClientConstructorTest()
  24. {
  25. string host = string.Empty; // TODO: Initialize to an appropriate value
  26. string username = string.Empty; // TODO: Initialize to an appropriate value
  27. PrivateKeyFile[] keyFiles = null; // TODO: Initialize to an appropriate value
  28. SftpClient target = new SftpClient(host, username, keyFiles);
  29. Assert.Inconclusive("TODO: Implement code to verify target");
  30. }
  31. /// <summary>
  32. ///A test for SftpClient Constructor
  33. ///</summary>
  34. [TestMethod]
  35. [Ignore] // placeholder for actual test
  36. public void SftpClientConstructorTest1()
  37. {
  38. string host = string.Empty; // TODO: Initialize to an appropriate value
  39. int port = 0; // TODO: Initialize to an appropriate value
  40. string username = string.Empty; // TODO: Initialize to an appropriate value
  41. PrivateKeyFile[] keyFiles = null; // TODO: Initialize to an appropriate value
  42. SftpClient target = new SftpClient(host, port, username, keyFiles);
  43. Assert.Inconclusive("TODO: Implement code to verify target");
  44. }
  45. /// <summary>
  46. ///A test for SftpClient Constructor
  47. ///</summary>
  48. [TestMethod]
  49. [Ignore] // placeholder for actual test
  50. public void SftpClientConstructorTest2()
  51. {
  52. string host = string.Empty; // TODO: Initialize to an appropriate value
  53. string username = string.Empty; // TODO: Initialize to an appropriate value
  54. string password = string.Empty; // TODO: Initialize to an appropriate value
  55. SftpClient target = new SftpClient(host, username, password);
  56. Assert.Inconclusive("TODO: Implement code to verify target");
  57. }
  58. /// <summary>
  59. ///A test for SftpClient Constructor
  60. ///</summary>
  61. [TestMethod]
  62. [Ignore] // placeholder for actual test
  63. public void SftpClientConstructorTest3()
  64. {
  65. string host = string.Empty; // TODO: Initialize to an appropriate value
  66. int port = 0; // TODO: Initialize to an appropriate value
  67. string username = string.Empty; // TODO: Initialize to an appropriate value
  68. string password = string.Empty; // TODO: Initialize to an appropriate value
  69. SftpClient target = new SftpClient(host, port, username, password);
  70. Assert.Inconclusive("TODO: Implement code to verify target");
  71. }
  72. /// <summary>
  73. ///A test for SftpClient Constructor
  74. ///</summary>
  75. [TestMethod]
  76. [Ignore] // placeholder for actual test
  77. public void SftpClientConstructorTest4()
  78. {
  79. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  80. SftpClient target = new SftpClient(connectionInfo);
  81. Assert.Inconclusive("TODO: Implement code to verify target");
  82. }
  83. /// <summary>
  84. ///A test for ChangePermissions
  85. ///</summary>
  86. [TestMethod]
  87. [Ignore] // placeholder for actual test
  88. public void ChangePermissionsTest()
  89. {
  90. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  91. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  92. string path = string.Empty; // TODO: Initialize to an appropriate value
  93. short mode = 0; // TODO: Initialize to an appropriate value
  94. target.ChangePermissions(path, mode);
  95. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  96. }
  97. /// <summary>
  98. ///A test for ChangeDirectory
  99. ///</summary>
  100. [TestMethod]
  101. [Ignore] // placeholder for actual test
  102. public void ChangeDirectoryTest()
  103. {
  104. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  105. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  106. string path = string.Empty; // TODO: Initialize to an appropriate value
  107. target.ChangeDirectory(path);
  108. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  109. }
  110. /// <summary>
  111. ///A test for BeginUploadFile
  112. ///</summary>
  113. [TestMethod]
  114. [Ignore] // placeholder for actual test
  115. public void BeginUploadFileTest()
  116. {
  117. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  118. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  119. Stream input = null; // TODO: Initialize to an appropriate value
  120. string path = string.Empty; // TODO: Initialize to an appropriate value
  121. AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
  122. object state = null; // TODO: Initialize to an appropriate value
  123. Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value
  124. IAsyncResult expected = null; // TODO: Initialize to an appropriate value
  125. IAsyncResult actual;
  126. actual = target.BeginUploadFile(input, path, asyncCallback, state, uploadCallback);
  127. Assert.AreEqual(expected, actual);
  128. Assert.Inconclusive("Verify the correctness of this test method.");
  129. }
  130. /// <summary>
  131. ///A test for BeginUploadFile
  132. ///</summary>
  133. [TestMethod]
  134. [Ignore] // placeholder for actual test
  135. public void BeginUploadFileTest1()
  136. {
  137. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  138. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  139. Stream input = null; // TODO: Initialize to an appropriate value
  140. string path = string.Empty; // TODO: Initialize to an appropriate value
  141. bool canOverride = false; // TODO: Initialize to an appropriate value
  142. AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
  143. object state = null; // TODO: Initialize to an appropriate value
  144. Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value
  145. IAsyncResult expected = null; // TODO: Initialize to an appropriate value
  146. IAsyncResult actual;
  147. actual = target.BeginUploadFile(input, path, canOverride, asyncCallback, state, uploadCallback);
  148. Assert.AreEqual(expected, actual);
  149. Assert.Inconclusive("Verify the correctness of this test method.");
  150. }
  151. /// <summary>
  152. ///A test for BeginSynchronizeDirectories
  153. ///</summary>
  154. [TestMethod]
  155. [Ignore] // placeholder for actual test
  156. public void BeginSynchronizeDirectoriesTest()
  157. {
  158. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  159. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  160. string sourcePath = string.Empty; // TODO: Initialize to an appropriate value
  161. string destinationPath = string.Empty; // TODO: Initialize to an appropriate value
  162. string searchPattern = string.Empty; // TODO: Initialize to an appropriate value
  163. AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
  164. object state = null; // TODO: Initialize to an appropriate value
  165. IAsyncResult expected = null; // TODO: Initialize to an appropriate value
  166. IAsyncResult actual;
  167. actual = target.BeginSynchronizeDirectories(sourcePath, destinationPath, searchPattern, asyncCallback, state);
  168. Assert.AreEqual(expected, actual);
  169. Assert.Inconclusive("Verify the correctness of this test method.");
  170. }
  171. /// <summary>
  172. ///A test for BeginListDirectory
  173. ///</summary>
  174. [TestMethod]
  175. [Ignore] // placeholder for actual test
  176. public void BeginListDirectoryTest()
  177. {
  178. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  179. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  180. string path = string.Empty; // TODO: Initialize to an appropriate value
  181. AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
  182. object state = null; // TODO: Initialize to an appropriate value
  183. Action<int> listCallback = null; // TODO: Initialize to an appropriate value
  184. IAsyncResult expected = null; // TODO: Initialize to an appropriate value
  185. IAsyncResult actual;
  186. actual = target.BeginListDirectory(path, asyncCallback, state, listCallback);
  187. Assert.AreEqual(expected, actual);
  188. Assert.Inconclusive("Verify the correctness of this test method.");
  189. }
  190. /// <summary>
  191. ///A test for BeginDownloadFile
  192. ///</summary>
  193. [TestMethod]
  194. [Ignore] // placeholder for actual test
  195. public void BeginDownloadFileTest()
  196. {
  197. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  198. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  199. string path = string.Empty; // TODO: Initialize to an appropriate value
  200. Stream output = null; // TODO: Initialize to an appropriate value
  201. AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
  202. object state = null; // TODO: Initialize to an appropriate value
  203. Action<ulong> downloadCallback = null; // TODO: Initialize to an appropriate value
  204. IAsyncResult expected = null; // TODO: Initialize to an appropriate value
  205. IAsyncResult actual;
  206. actual = target.BeginDownloadFile(path, output, asyncCallback, state, downloadCallback);
  207. Assert.AreEqual(expected, actual);
  208. Assert.Inconclusive("Verify the correctness of this test method.");
  209. }
  210. /// <summary>
  211. ///A test for AppendText
  212. ///</summary>
  213. [TestMethod]
  214. [Ignore] // placeholder for actual test
  215. public void AppendTextTest()
  216. {
  217. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  218. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  219. string path = string.Empty; // TODO: Initialize to an appropriate value
  220. Encoding encoding = null; // TODO: Initialize to an appropriate value
  221. StreamWriter expected = null; // TODO: Initialize to an appropriate value
  222. StreamWriter actual;
  223. actual = target.AppendText(path, encoding);
  224. Assert.AreEqual(expected, actual);
  225. Assert.Inconclusive("Verify the correctness of this test method.");
  226. }
  227. /// <summary>
  228. ///A test for AppendText
  229. ///</summary>
  230. [TestMethod]
  231. [Ignore] // placeholder for actual test
  232. public void AppendTextTest1()
  233. {
  234. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  235. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  236. string path = string.Empty; // TODO: Initialize to an appropriate value
  237. StreamWriter expected = null; // TODO: Initialize to an appropriate value
  238. StreamWriter actual;
  239. actual = target.AppendText(path);
  240. Assert.AreEqual(expected, actual);
  241. Assert.Inconclusive("Verify the correctness of this test method.");
  242. }
  243. /// <summary>
  244. ///A test for AppendAllText
  245. ///</summary>
  246. [TestMethod]
  247. [Ignore] // placeholder for actual test
  248. public void AppendAllTextTest()
  249. {
  250. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  251. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  252. string path = string.Empty; // TODO: Initialize to an appropriate value
  253. string contents = string.Empty; // TODO: Initialize to an appropriate value
  254. target.AppendAllText(path, contents);
  255. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  256. }
  257. /// <summary>
  258. ///A test for AppendAllText
  259. ///</summary>
  260. [TestMethod]
  261. [Ignore] // placeholder for actual test
  262. public void AppendAllTextTest1()
  263. {
  264. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  265. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  266. string path = string.Empty; // TODO: Initialize to an appropriate value
  267. string contents = string.Empty; // TODO: Initialize to an appropriate value
  268. Encoding encoding = null; // TODO: Initialize to an appropriate value
  269. target.AppendAllText(path, contents, encoding);
  270. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  271. }
  272. /// <summary>
  273. ///A test for AppendAllLines
  274. ///</summary>
  275. [TestMethod]
  276. [Ignore] // placeholder for actual test
  277. public void AppendAllLinesTest()
  278. {
  279. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  280. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  281. string path = string.Empty; // TODO: Initialize to an appropriate value
  282. IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value
  283. target.AppendAllLines(path, contents);
  284. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  285. }
  286. /// <summary>
  287. ///A test for AppendAllLines
  288. ///</summary>
  289. [TestMethod]
  290. [Ignore] // placeholder for actual test
  291. public void AppendAllLinesTest1()
  292. {
  293. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  294. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  295. string path = string.Empty; // TODO: Initialize to an appropriate value
  296. IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value
  297. Encoding encoding = null; // TODO: Initialize to an appropriate value
  298. target.AppendAllLines(path, contents, encoding);
  299. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  300. }
  301. /// <summary>
  302. ///A test for CreateText
  303. ///</summary>
  304. [TestMethod]
  305. [Ignore] // placeholder for actual test
  306. public void CreateTextTest()
  307. {
  308. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  309. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  310. string path = string.Empty; // TODO: Initialize to an appropriate value
  311. Encoding encoding = null; // TODO: Initialize to an appropriate value
  312. StreamWriter expected = null; // TODO: Initialize to an appropriate value
  313. StreamWriter actual;
  314. actual = target.CreateText(path, encoding);
  315. Assert.AreEqual(expected, actual);
  316. Assert.Inconclusive("Verify the correctness of this test method.");
  317. }
  318. /// <summary>
  319. ///A test for CreateText
  320. ///</summary>
  321. [TestMethod]
  322. [Ignore] // placeholder for actual test
  323. public void CreateTextTest1()
  324. {
  325. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  326. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  327. string path = string.Empty; // TODO: Initialize to an appropriate value
  328. StreamWriter expected = null; // TODO: Initialize to an appropriate value
  329. StreamWriter actual;
  330. actual = target.CreateText(path);
  331. Assert.AreEqual(expected, actual);
  332. Assert.Inconclusive("Verify the correctness of this test method.");
  333. }
  334. /// <summary>
  335. ///A test for CreateDirectory
  336. ///</summary>
  337. [TestMethod]
  338. [Ignore] // placeholder for actual test
  339. public void CreateDirectoryTest()
  340. {
  341. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  342. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  343. string path = string.Empty; // TODO: Initialize to an appropriate value
  344. target.CreateDirectory(path);
  345. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  346. }
  347. /// <summary>
  348. ///A test for Create
  349. ///</summary>
  350. [TestMethod]
  351. [Ignore] // placeholder for actual test
  352. public void CreateTest()
  353. {
  354. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  355. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  356. string path = string.Empty; // TODO: Initialize to an appropriate value
  357. int bufferSize = 0; // TODO: Initialize to an appropriate value
  358. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  359. SftpFileStream actual;
  360. actual = target.Create(path, bufferSize);
  361. Assert.AreEqual(expected, actual);
  362. Assert.Inconclusive("Verify the correctness of this test method.");
  363. }
  364. /// <summary>
  365. ///A test for Create
  366. ///</summary>
  367. [TestMethod]
  368. [Ignore] // placeholder for actual test
  369. public void CreateTest1()
  370. {
  371. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  372. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  373. string path = string.Empty; // TODO: Initialize to an appropriate value
  374. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  375. SftpFileStream actual;
  376. actual = target.Create(path);
  377. Assert.AreEqual(expected, actual);
  378. Assert.Inconclusive("Verify the correctness of this test method.");
  379. }
  380. /// <summary>
  381. ///A test for EndSynchronizeDirectories
  382. ///</summary>
  383. [TestMethod]
  384. [Ignore] // placeholder for actual test
  385. public void EndSynchronizeDirectoriesTest()
  386. {
  387. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  388. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  389. IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value
  390. IEnumerable<FileInfo> expected = null; // TODO: Initialize to an appropriate value
  391. IEnumerable<FileInfo> actual;
  392. actual = target.EndSynchronizeDirectories(asyncResult);
  393. Assert.AreEqual(expected, actual);
  394. Assert.Inconclusive("Verify the correctness of this test method.");
  395. }
  396. /// <summary>
  397. ///A test for EndListDirectory
  398. ///</summary>
  399. [TestMethod]
  400. [Ignore] // placeholder for actual test
  401. public void EndListDirectoryTest()
  402. {
  403. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  404. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  405. IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value
  406. IEnumerable<SftpFile> expected = null; // TODO: Initialize to an appropriate value
  407. IEnumerable<SftpFile> actual;
  408. actual = target.EndListDirectory(asyncResult);
  409. Assert.AreEqual(expected, actual);
  410. Assert.Inconclusive("Verify the correctness of this test method.");
  411. }
  412. /// <summary>
  413. ///A test for EndDownloadFile
  414. ///</summary>
  415. [TestMethod]
  416. [Ignore] // placeholder for actual test
  417. public void EndDownloadFileTest()
  418. {
  419. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  420. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  421. IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value
  422. target.EndDownloadFile(asyncResult);
  423. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  424. }
  425. /// <summary>
  426. ///A test for DownloadFile
  427. ///</summary>
  428. [TestMethod]
  429. [Ignore] // placeholder for actual test
  430. public void DownloadFileTest()
  431. {
  432. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  433. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  434. string path = string.Empty; // TODO: Initialize to an appropriate value
  435. Stream output = null; // TODO: Initialize to an appropriate value
  436. Action<ulong> downloadCallback = null; // TODO: Initialize to an appropriate value
  437. target.DownloadFile(path, output, downloadCallback);
  438. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  439. }
  440. /// <summary>
  441. ///A test for DeleteFile
  442. ///</summary>
  443. [TestMethod]
  444. [Ignore] // placeholder for actual test
  445. public void DeleteFileTest()
  446. {
  447. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  448. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  449. string path = string.Empty; // TODO: Initialize to an appropriate value
  450. target.DeleteFile(path);
  451. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  452. }
  453. /// <summary>
  454. ///A test for DeleteDirectory
  455. ///</summary>
  456. [TestMethod]
  457. [Ignore] // placeholder for actual test
  458. public void DeleteDirectoryTest()
  459. {
  460. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  461. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  462. string path = string.Empty; // TODO: Initialize to an appropriate value
  463. target.DeleteDirectory(path);
  464. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  465. }
  466. /// <summary>
  467. ///A test for Delete
  468. ///</summary>
  469. [TestMethod]
  470. [Ignore] // placeholder for actual test
  471. public void DeleteTest()
  472. {
  473. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  474. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  475. string path = string.Empty; // TODO: Initialize to an appropriate value
  476. target.Delete(path);
  477. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  478. }
  479. /// <summary>
  480. ///A test for GetLastAccessTimeUtc
  481. ///</summary>
  482. [TestMethod]
  483. [Ignore] // placeholder for actual test
  484. public void GetLastAccessTimeUtcTest()
  485. {
  486. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  487. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  488. string path = string.Empty; // TODO: Initialize to an appropriate value
  489. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  490. DateTime actual;
  491. actual = target.GetLastAccessTimeUtc(path);
  492. Assert.AreEqual(expected, actual);
  493. Assert.Inconclusive("Verify the correctness of this test method.");
  494. }
  495. /// <summary>
  496. ///A test for GetLastAccessTime
  497. ///</summary>
  498. [TestMethod]
  499. [Ignore] // placeholder for actual test
  500. public void GetLastAccessTimeTest()
  501. {
  502. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  503. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  504. string path = string.Empty; // TODO: Initialize to an appropriate value
  505. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  506. DateTime actual;
  507. actual = target.GetLastAccessTime(path);
  508. Assert.AreEqual(expected, actual);
  509. Assert.Inconclusive("Verify the correctness of this test method.");
  510. }
  511. /// <summary>
  512. ///A test for GetAttributes
  513. ///</summary>
  514. [TestMethod]
  515. [Ignore] // placeholder for actual test
  516. public void GetAttributesTest()
  517. {
  518. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  519. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  520. string path = string.Empty; // TODO: Initialize to an appropriate value
  521. SftpFileAttributes expected = null; // TODO: Initialize to an appropriate value
  522. SftpFileAttributes actual;
  523. actual = target.GetAttributes(path);
  524. Assert.AreEqual(expected, actual);
  525. Assert.Inconclusive("Verify the correctness of this test method.");
  526. }
  527. /// <summary>
  528. ///A test for Get
  529. ///</summary>
  530. [TestMethod]
  531. [Ignore] // placeholder for actual test
  532. public void GetTest()
  533. {
  534. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  535. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  536. string path = string.Empty; // TODO: Initialize to an appropriate value
  537. SftpFile expected = null; // TODO: Initialize to an appropriate value
  538. SftpFile actual;
  539. actual = target.Get(path);
  540. Assert.AreEqual(expected, actual);
  541. Assert.Inconclusive("Verify the correctness of this test method.");
  542. }
  543. /// <summary>
  544. ///A test for Exists
  545. ///</summary>
  546. [TestMethod]
  547. [Ignore] // placeholder for actual test
  548. public void ExistsTest()
  549. {
  550. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  551. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  552. string path = string.Empty; // TODO: Initialize to an appropriate value
  553. bool expected = false; // TODO: Initialize to an appropriate value
  554. bool actual;
  555. actual = target.Exists(path);
  556. Assert.AreEqual(expected, actual);
  557. Assert.Inconclusive("Verify the correctness of this test method.");
  558. }
  559. /// <summary>
  560. ///A test for EndUploadFile
  561. ///</summary>
  562. [TestMethod]
  563. [Ignore] // placeholder for actual test
  564. public void EndUploadFileTest()
  565. {
  566. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  567. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  568. IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value
  569. target.EndUploadFile(asyncResult);
  570. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  571. }
  572. /// <summary>
  573. ///A test for GetLastWriteTimeUtc
  574. ///</summary>
  575. [TestMethod]
  576. [Ignore] // placeholder for actual test
  577. public void GetLastWriteTimeUtcTest()
  578. {
  579. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  580. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  581. string path = string.Empty; // TODO: Initialize to an appropriate value
  582. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  583. DateTime actual;
  584. actual = target.GetLastWriteTimeUtc(path);
  585. Assert.AreEqual(expected, actual);
  586. Assert.Inconclusive("Verify the correctness of this test method.");
  587. }
  588. /// <summary>
  589. ///A test for GetLastWriteTime
  590. ///</summary>
  591. [TestMethod]
  592. [Ignore] // placeholder for actual test
  593. public void GetLastWriteTimeTest()
  594. {
  595. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  596. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  597. string path = string.Empty; // TODO: Initialize to an appropriate value
  598. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  599. DateTime actual;
  600. actual = target.GetLastWriteTime(path);
  601. Assert.AreEqual(expected, actual);
  602. Assert.Inconclusive("Verify the correctness of this test method.");
  603. }
  604. /// <summary>
  605. ///A test for GetStatus
  606. ///</summary>
  607. [TestMethod]
  608. [Ignore] // placeholder for actual test
  609. public void GetStatusTest()
  610. {
  611. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  612. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  613. string path = string.Empty; // TODO: Initialize to an appropriate value
  614. SftpFileSytemInformation expected = null; // TODO: Initialize to an appropriate value
  615. SftpFileSytemInformation actual;
  616. actual = target.GetStatus(path);
  617. Assert.AreEqual(expected, actual);
  618. Assert.Inconclusive("Verify the correctness of this test method.");
  619. }
  620. /// <summary>
  621. ///A test for ListDirectory
  622. ///</summary>
  623. [TestMethod]
  624. [Ignore] // placeholder for actual test
  625. public void ListDirectoryTest()
  626. {
  627. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  628. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  629. string path = string.Empty; // TODO: Initialize to an appropriate value
  630. Action<int> listCallback = null; // TODO: Initialize to an appropriate value
  631. IEnumerable<SftpFile> expected = null; // TODO: Initialize to an appropriate value
  632. IEnumerable<SftpFile> actual;
  633. actual = target.ListDirectory(path, listCallback);
  634. Assert.AreEqual(expected, actual);
  635. Assert.Inconclusive("Verify the correctness of this test method.");
  636. }
  637. /// <summary>
  638. ///A test for Open
  639. ///</summary>
  640. [TestMethod]
  641. [Ignore] // placeholder for actual test
  642. public void OpenTest()
  643. {
  644. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  645. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  646. string path = string.Empty; // TODO: Initialize to an appropriate value
  647. FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value
  648. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  649. SftpFileStream actual;
  650. actual = target.Open(path, mode);
  651. Assert.AreEqual(expected, actual);
  652. Assert.Inconclusive("Verify the correctness of this test method.");
  653. }
  654. /// <summary>
  655. ///A test for Open
  656. ///</summary>
  657. [TestMethod]
  658. [Ignore] // placeholder for actual test
  659. public void OpenTest1()
  660. {
  661. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  662. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  663. string path = string.Empty; // TODO: Initialize to an appropriate value
  664. FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value
  665. FileAccess access = new FileAccess(); // TODO: Initialize to an appropriate value
  666. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  667. SftpFileStream actual;
  668. actual = target.Open(path, mode, access);
  669. Assert.AreEqual(expected, actual);
  670. Assert.Inconclusive("Verify the correctness of this test method.");
  671. }
  672. /// <summary>
  673. ///A test for OpenRead
  674. ///</summary>
  675. [TestMethod]
  676. [Ignore] // placeholder for actual test
  677. public void OpenReadTest()
  678. {
  679. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  680. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  681. string path = string.Empty; // TODO: Initialize to an appropriate value
  682. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  683. SftpFileStream actual;
  684. actual = target.OpenRead(path);
  685. Assert.AreEqual(expected, actual);
  686. Assert.Inconclusive("Verify the correctness of this test method.");
  687. }
  688. /// <summary>
  689. ///A test for OpenText
  690. ///</summary>
  691. [TestMethod]
  692. [Ignore] // placeholder for actual test
  693. public void OpenTextTest()
  694. {
  695. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  696. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  697. string path = string.Empty; // TODO: Initialize to an appropriate value
  698. StreamReader expected = null; // TODO: Initialize to an appropriate value
  699. StreamReader actual;
  700. actual = target.OpenText(path);
  701. Assert.AreEqual(expected, actual);
  702. Assert.Inconclusive("Verify the correctness of this test method.");
  703. }
  704. /// <summary>
  705. ///A test for OpenWrite
  706. ///</summary>
  707. [TestMethod]
  708. [Ignore] // placeholder for actual test
  709. public void OpenWriteTest()
  710. {
  711. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  712. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  713. string path = string.Empty; // TODO: Initialize to an appropriate value
  714. SftpFileStream expected = null; // TODO: Initialize to an appropriate value
  715. SftpFileStream actual;
  716. actual = target.OpenWrite(path);
  717. Assert.AreEqual(expected, actual);
  718. Assert.Inconclusive("Verify the correctness of this test method.");
  719. }
  720. /// <summary>
  721. ///A test for ReadAllBytes
  722. ///</summary>
  723. [TestMethod]
  724. [Ignore] // placeholder for actual test
  725. public void ReadAllBytesTest()
  726. {
  727. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  728. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  729. string path = string.Empty; // TODO: Initialize to an appropriate value
  730. byte[] expected = null; // TODO: Initialize to an appropriate value
  731. byte[] actual;
  732. actual = target.ReadAllBytes(path);
  733. Assert.AreEqual(expected, actual);
  734. Assert.Inconclusive("Verify the correctness of this test method.");
  735. }
  736. /// <summary>
  737. ///A test for ReadAllLines
  738. ///</summary>
  739. [TestMethod]
  740. [Ignore] // placeholder for actual test
  741. public void ReadAllLinesTest()
  742. {
  743. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  744. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  745. string path = string.Empty; // TODO: Initialize to an appropriate value
  746. Encoding encoding = null; // TODO: Initialize to an appropriate value
  747. string[] expected = null; // TODO: Initialize to an appropriate value
  748. string[] actual;
  749. actual = target.ReadAllLines(path, encoding);
  750. Assert.AreEqual(expected, actual);
  751. Assert.Inconclusive("Verify the correctness of this test method.");
  752. }
  753. /// <summary>
  754. ///A test for ReadAllLines
  755. ///</summary>
  756. [TestMethod]
  757. [Ignore] // placeholder for actual test
  758. public void ReadAllLinesTest1()
  759. {
  760. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  761. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  762. string path = string.Empty; // TODO: Initialize to an appropriate value
  763. string[] expected = null; // TODO: Initialize to an appropriate value
  764. string[] actual;
  765. actual = target.ReadAllLines(path);
  766. Assert.AreEqual(expected, actual);
  767. Assert.Inconclusive("Verify the correctness of this test method.");
  768. }
  769. /// <summary>
  770. ///A test for ReadAllText
  771. ///</summary>
  772. [TestMethod]
  773. [Ignore] // placeholder for actual test
  774. public void ReadAllTextTest()
  775. {
  776. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  777. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  778. string path = string.Empty; // TODO: Initialize to an appropriate value
  779. Encoding encoding = null; // TODO: Initialize to an appropriate value
  780. string expected = string.Empty; // TODO: Initialize to an appropriate value
  781. string actual;
  782. actual = target.ReadAllText(path, encoding);
  783. Assert.AreEqual(expected, actual);
  784. Assert.Inconclusive("Verify the correctness of this test method.");
  785. }
  786. /// <summary>
  787. ///A test for ReadAllText
  788. ///</summary>
  789. [TestMethod]
  790. [Ignore] // placeholder for actual test
  791. public void ReadAllTextTest1()
  792. {
  793. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  794. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  795. string path = string.Empty; // TODO: Initialize to an appropriate value
  796. string expected = string.Empty; // TODO: Initialize to an appropriate value
  797. string actual;
  798. actual = target.ReadAllText(path);
  799. Assert.AreEqual(expected, actual);
  800. Assert.Inconclusive("Verify the correctness of this test method.");
  801. }
  802. /// <summary>
  803. ///A test for ReadLines
  804. ///</summary>
  805. [TestMethod]
  806. [Ignore] // placeholder for actual test
  807. public void ReadLinesTest()
  808. {
  809. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  810. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  811. string path = string.Empty; // TODO: Initialize to an appropriate value
  812. IEnumerable<string> expected = null; // TODO: Initialize to an appropriate value
  813. IEnumerable<string> actual;
  814. actual = target.ReadLines(path);
  815. Assert.AreEqual(expected, actual);
  816. Assert.Inconclusive("Verify the correctness of this test method.");
  817. }
  818. /// <summary>
  819. ///A test for ReadLines
  820. ///</summary>
  821. [TestMethod]
  822. [Ignore] // placeholder for actual test
  823. public void ReadLinesTest1()
  824. {
  825. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  826. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  827. string path = string.Empty; // TODO: Initialize to an appropriate value
  828. Encoding encoding = null; // TODO: Initialize to an appropriate value
  829. IEnumerable<string> expected = null; // TODO: Initialize to an appropriate value
  830. IEnumerable<string> actual;
  831. actual = target.ReadLines(path, encoding);
  832. Assert.AreEqual(expected, actual);
  833. Assert.Inconclusive("Verify the correctness of this test method.");
  834. }
  835. /// <summary>
  836. ///A test for RenameFile
  837. ///</summary>
  838. [TestMethod]
  839. [Ignore] // placeholder for actual test
  840. public void RenameFileTest()
  841. {
  842. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  843. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  844. string oldPath = string.Empty; // TODO: Initialize to an appropriate value
  845. string newPath = string.Empty; // TODO: Initialize to an appropriate value
  846. target.RenameFile(oldPath, newPath);
  847. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  848. }
  849. /// <summary>
  850. ///A test for RenameFile
  851. ///</summary>
  852. [TestMethod]
  853. [Ignore] // placeholder for actual test
  854. public void RenameFileTest1()
  855. {
  856. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  857. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  858. string oldPath = string.Empty; // TODO: Initialize to an appropriate value
  859. string newPath = string.Empty; // TODO: Initialize to an appropriate value
  860. bool isPosix = false; // TODO: Initialize to an appropriate value
  861. target.RenameFile(oldPath, newPath, isPosix);
  862. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  863. }
  864. /// <summary>
  865. ///A test for SetAttributes
  866. ///</summary>
  867. [TestMethod]
  868. [Ignore] // placeholder for actual test
  869. public void SetAttributesTest()
  870. {
  871. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  872. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  873. string path = string.Empty; // TODO: Initialize to an appropriate value
  874. SftpFileAttributes fileAttributes = null; // TODO: Initialize to an appropriate value
  875. target.SetAttributes(path, fileAttributes);
  876. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  877. }
  878. /// <summary>
  879. ///A test for SetLastAccessTime
  880. ///</summary>
  881. [TestMethod]
  882. [Ignore] // placeholder for actual test
  883. public void SetLastAccessTimeTest()
  884. {
  885. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  886. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  887. string path = string.Empty; // TODO: Initialize to an appropriate value
  888. DateTime lastAccessTime = new DateTime(); // TODO: Initialize to an appropriate value
  889. target.SetLastAccessTime(path, lastAccessTime);
  890. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  891. }
  892. /// <summary>
  893. ///A test for SetLastAccessTimeUtc
  894. ///</summary>
  895. [TestMethod]
  896. [Ignore] // placeholder for actual test
  897. public void SetLastAccessTimeUtcTest()
  898. {
  899. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  900. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  901. string path = string.Empty; // TODO: Initialize to an appropriate value
  902. DateTime lastAccessTimeUtc = new DateTime(); // TODO: Initialize to an appropriate value
  903. target.SetLastAccessTimeUtc(path, lastAccessTimeUtc);
  904. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  905. }
  906. /// <summary>
  907. ///A test for SetLastWriteTime
  908. ///</summary>
  909. [TestMethod]
  910. [Ignore] // placeholder for actual test
  911. public void SetLastWriteTimeTest()
  912. {
  913. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  914. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  915. string path = string.Empty; // TODO: Initialize to an appropriate value
  916. DateTime lastWriteTime = new DateTime(); // TODO: Initialize to an appropriate value
  917. target.SetLastWriteTime(path, lastWriteTime);
  918. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  919. }
  920. /// <summary>
  921. ///A test for SetLastWriteTimeUtc
  922. ///</summary>
  923. [TestMethod]
  924. [Ignore] // placeholder for actual test
  925. public void SetLastWriteTimeUtcTest()
  926. {
  927. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  928. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  929. string path = string.Empty; // TODO: Initialize to an appropriate value
  930. DateTime lastWriteTimeUtc = new DateTime(); // TODO: Initialize to an appropriate value
  931. target.SetLastWriteTimeUtc(path, lastWriteTimeUtc);
  932. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  933. }
  934. /// <summary>
  935. ///A test for SymbolicLink
  936. ///</summary>
  937. [TestMethod]
  938. [Ignore] // placeholder for actual test
  939. public void SymbolicLinkTest()
  940. {
  941. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  942. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  943. string path = string.Empty; // TODO: Initialize to an appropriate value
  944. string linkPath = string.Empty; // TODO: Initialize to an appropriate value
  945. target.SymbolicLink(path, linkPath);
  946. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  947. }
  948. /// <summary>
  949. ///A test for SynchronizeDirectories
  950. ///</summary>
  951. [TestMethod]
  952. [Ignore] // placeholder for actual test
  953. public void SynchronizeDirectoriesTest()
  954. {
  955. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  956. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  957. string sourcePath = string.Empty; // TODO: Initialize to an appropriate value
  958. string destinationPath = string.Empty; // TODO: Initialize to an appropriate value
  959. string searchPattern = string.Empty; // TODO: Initialize to an appropriate value
  960. IEnumerable<FileInfo> expected = null; // TODO: Initialize to an appropriate value
  961. IEnumerable<FileInfo> actual;
  962. actual = target.SynchronizeDirectories(sourcePath, destinationPath, searchPattern);
  963. Assert.AreEqual(expected, actual);
  964. Assert.Inconclusive("Verify the correctness of this test method.");
  965. }
  966. /// <summary>
  967. ///A test for UploadFile
  968. ///</summary>
  969. [TestMethod]
  970. [Ignore] // placeholder for actual test
  971. public void UploadFileTest()
  972. {
  973. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  974. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  975. Stream input = null; // TODO: Initialize to an appropriate value
  976. string path = string.Empty; // TODO: Initialize to an appropriate value
  977. Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value
  978. target.UploadFile(input, path, uploadCallback);
  979. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  980. }
  981. /// <summary>
  982. ///A test for UploadFile
  983. ///</summary>
  984. [TestMethod]
  985. [Ignore] // placeholder for actual test
  986. public void UploadFileTest1()
  987. {
  988. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  989. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  990. Stream input = null; // TODO: Initialize to an appropriate value
  991. string path = string.Empty; // TODO: Initialize to an appropriate value
  992. bool canOverride = false; // TODO: Initialize to an appropriate value
  993. Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value
  994. target.UploadFile(input, path, canOverride, uploadCallback);
  995. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  996. }
  997. /// <summary>
  998. ///A test for WriteAllBytes
  999. ///</summary>
  1000. [TestMethod]
  1001. [Ignore] // placeholder for actual test
  1002. public void WriteAllBytesTest()
  1003. {
  1004. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1005. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1006. string path = string.Empty; // TODO: Initialize to an appropriate value
  1007. byte[] bytes = null; // TODO: Initialize to an appropriate value
  1008. target.WriteAllBytes(path, bytes);
  1009. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1010. }
  1011. /// <summary>
  1012. ///A test for WriteAllLines
  1013. ///</summary>
  1014. [TestMethod]
  1015. [Ignore] // placeholder for actual test
  1016. public void WriteAllLinesTest()
  1017. {
  1018. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1019. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1020. string path = string.Empty; // TODO: Initialize to an appropriate value
  1021. IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value
  1022. target.WriteAllLines(path, contents);
  1023. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1024. }
  1025. /// <summary>
  1026. ///A test for WriteAllLines
  1027. ///</summary>
  1028. [TestMethod]
  1029. [Ignore] // placeholder for actual test
  1030. public void WriteAllLinesTest1()
  1031. {
  1032. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1033. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1034. string path = string.Empty; // TODO: Initialize to an appropriate value
  1035. string[] contents = null; // TODO: Initialize to an appropriate value
  1036. target.WriteAllLines(path, contents);
  1037. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1038. }
  1039. /// <summary>
  1040. ///A test for WriteAllLines
  1041. ///</summary>
  1042. [TestMethod]
  1043. [Ignore] // placeholder for actual test
  1044. public void WriteAllLinesTest2()
  1045. {
  1046. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1047. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1048. string path = string.Empty; // TODO: Initialize to an appropriate value
  1049. IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value
  1050. Encoding encoding = null; // TODO: Initialize to an appropriate value
  1051. target.WriteAllLines(path, contents, encoding);
  1052. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1053. }
  1054. /// <summary>
  1055. ///A test for WriteAllLines
  1056. ///</summary>
  1057. [TestMethod]
  1058. [Ignore] // placeholder for actual test
  1059. public void WriteAllLinesTest3()
  1060. {
  1061. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1062. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1063. string path = string.Empty; // TODO: Initialize to an appropriate value
  1064. string[] contents = null; // TODO: Initialize to an appropriate value
  1065. Encoding encoding = null; // TODO: Initialize to an appropriate value
  1066. target.WriteAllLines(path, contents, encoding);
  1067. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1068. }
  1069. /// <summary>
  1070. ///A test for WriteAllText
  1071. ///</summary>
  1072. [TestMethod]
  1073. [Ignore] // placeholder for actual test
  1074. public void WriteAllTextTest()
  1075. {
  1076. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1077. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1078. string path = string.Empty; // TODO: Initialize to an appropriate value
  1079. string contents = string.Empty; // TODO: Initialize to an appropriate value
  1080. target.WriteAllText(path, contents);
  1081. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1082. }
  1083. /// <summary>
  1084. ///A test for WriteAllText
  1085. ///</summary>
  1086. [TestMethod]
  1087. [Ignore] // placeholder for actual test
  1088. public void WriteAllTextTest1()
  1089. {
  1090. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1091. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1092. string path = string.Empty; // TODO: Initialize to an appropriate value
  1093. string contents = string.Empty; // TODO: Initialize to an appropriate value
  1094. Encoding encoding = null; // TODO: Initialize to an appropriate value
  1095. target.WriteAllText(path, contents, encoding);
  1096. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  1097. }
  1098. /// <summary>
  1099. ///A test for BufferSize
  1100. ///</summary>
  1101. [TestMethod]
  1102. [Ignore] // placeholder for actual test
  1103. public void BufferSizeTest()
  1104. {
  1105. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1106. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1107. uint expected = 0; // TODO: Initialize to an appropriate value
  1108. uint actual;
  1109. target.BufferSize = expected;
  1110. actual = target.BufferSize;
  1111. Assert.AreEqual(expected, actual);
  1112. Assert.Inconclusive("Verify the correctness of this test method.");
  1113. }
  1114. /// <summary>
  1115. ///A test for OperationTimeout
  1116. ///</summary>
  1117. [TestMethod]
  1118. [Ignore] // placeholder for actual test
  1119. public void OperationTimeoutTest()
  1120. {
  1121. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1122. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1123. TimeSpan expected = new TimeSpan(); // TODO: Initialize to an appropriate value
  1124. TimeSpan actual;
  1125. target.OperationTimeout = expected;
  1126. actual = target.OperationTimeout;
  1127. Assert.AreEqual(expected, actual);
  1128. Assert.Inconclusive("Verify the correctness of this test method.");
  1129. }
  1130. /// <summary>
  1131. ///A test for WorkingDirectory
  1132. ///</summary>
  1133. [TestMethod]
  1134. [Ignore] // placeholder for actual test
  1135. public void WorkingDirectoryTest()
  1136. {
  1137. ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value
  1138. SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value
  1139. string actual;
  1140. actual = target.WorkingDirectory;
  1141. Assert.Inconclusive("Verify the correctness of this test method.");
  1142. }
  1143. protected static string CalculateMD5(string fileName)
  1144. {
  1145. using (FileStream file = new FileStream(fileName, FileMode.Open))
  1146. {
  1147. MD5 md5 = new MD5CryptoServiceProvider();
  1148. byte[] retVal = md5.ComputeHash(file);
  1149. file.Close();
  1150. StringBuilder sb = new StringBuilder();
  1151. for (int i = 0; i < retVal.Length; i++)
  1152. {
  1153. sb.Append(retVal[i].ToString("x2"));
  1154. }
  1155. return sb.ToString();
  1156. }
  1157. }
  1158. private static void RemoveAllFiles()
  1159. {
  1160. using (var client = new SshClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
  1161. {
  1162. client.Connect();
  1163. client.RunCommand("rm -rf *");
  1164. client.Disconnect();
  1165. }
  1166. }
  1167. /// <summary>
  1168. /// Helper class to help with upload and download testing
  1169. /// </summary>
  1170. private class TestInfo
  1171. {
  1172. public string RemoteFileName { get; set; }
  1173. public string UploadedFileName { get; set; }
  1174. public string DownloadedFileName { get; set; }
  1175. //public ulong UploadedBytes { get; set; }
  1176. //public ulong DownloadedBytes { get; set; }
  1177. public FileStream UploadedFile { get; set; }
  1178. public FileStream DownloadedFile { get; set; }
  1179. public string UploadedHash { get; set; }
  1180. public string DownloadedHash { get; set; }
  1181. public SftpUploadAsyncResult UploadResult { get; set; }
  1182. public SftpDownloadAsyncResult DownloadResult { get; set; }
  1183. }
  1184. }
  1185. }