SftpFileAttributesTest.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. using Renci.SshNet.Sftp;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. using System;
  4. using Renci.SshNet.Tests.Common;
  5. namespace Renci.SshNet.Tests
  6. {
  7. /// <summary>
  8. ///This is a test class for SftpFileAttributesTest and is intended
  9. ///to contain all SftpFileAttributesTest Unit Tests
  10. ///</summary>
  11. [TestClass()]
  12. public class SftpFileAttributesTest : TestBase
  13. {
  14. /// <summary>
  15. ///A test for SetPermissions
  16. ///</summary>
  17. [TestMethod()]
  18. public void SetPermissionsTest()
  19. {
  20. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  21. short mode = 0; // TODO: Initialize to an appropriate value
  22. target.SetPermissions(mode);
  23. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  24. }
  25. /// <summary>
  26. ///A test for GroupCanExecute
  27. ///</summary>
  28. [TestMethod()]
  29. public void GroupCanExecuteTest()
  30. {
  31. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  32. bool expected = false; // TODO: Initialize to an appropriate value
  33. bool actual;
  34. target.GroupCanExecute = expected;
  35. actual = target.GroupCanExecute;
  36. Assert.AreEqual(expected, actual);
  37. Assert.Inconclusive("Verify the correctness of this test method.");
  38. }
  39. /// <summary>
  40. ///A test for GroupCanRead
  41. ///</summary>
  42. [TestMethod()]
  43. public void GroupCanReadTest()
  44. {
  45. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  46. bool expected = false; // TODO: Initialize to an appropriate value
  47. bool actual;
  48. target.GroupCanRead = expected;
  49. actual = target.GroupCanRead;
  50. Assert.AreEqual(expected, actual);
  51. Assert.Inconclusive("Verify the correctness of this test method.");
  52. }
  53. /// <summary>
  54. ///A test for GroupCanWrite
  55. ///</summary>
  56. [TestMethod()]
  57. public void GroupCanWriteTest()
  58. {
  59. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  60. bool expected = false; // TODO: Initialize to an appropriate value
  61. bool actual;
  62. target.GroupCanWrite = expected;
  63. actual = target.GroupCanWrite;
  64. Assert.AreEqual(expected, actual);
  65. Assert.Inconclusive("Verify the correctness of this test method.");
  66. }
  67. /// <summary>
  68. ///A test for GroupId
  69. ///</summary>
  70. [TestMethod()]
  71. public void GroupIdTest()
  72. {
  73. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  74. int expected = 0; // TODO: Initialize to an appropriate value
  75. int actual;
  76. target.GroupId = expected;
  77. actual = target.GroupId;
  78. Assert.AreEqual(expected, actual);
  79. Assert.Inconclusive("Verify the correctness of this test method.");
  80. }
  81. /// <summary>
  82. ///A test for LastAccessTime
  83. ///</summary>
  84. [TestMethod()]
  85. public void LastAccessTimeTest()
  86. {
  87. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  88. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  89. DateTime actual;
  90. target.LastAccessTime = expected;
  91. actual = target.LastAccessTime;
  92. Assert.AreEqual(expected, actual);
  93. Assert.Inconclusive("Verify the correctness of this test method.");
  94. }
  95. /// <summary>
  96. ///A test for LastWriteTime
  97. ///</summary>
  98. [TestMethod()]
  99. public void LastWriteTimeTest()
  100. {
  101. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  102. DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
  103. DateTime actual;
  104. target.LastWriteTime = expected;
  105. actual = target.LastWriteTime;
  106. Assert.AreEqual(expected, actual);
  107. Assert.Inconclusive("Verify the correctness of this test method.");
  108. }
  109. /// <summary>
  110. ///A test for OthersCanExecute
  111. ///</summary>
  112. [TestMethod()]
  113. public void OthersCanExecuteTest()
  114. {
  115. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  116. bool expected = false; // TODO: Initialize to an appropriate value
  117. bool actual;
  118. target.OthersCanExecute = expected;
  119. actual = target.OthersCanExecute;
  120. Assert.AreEqual(expected, actual);
  121. Assert.Inconclusive("Verify the correctness of this test method.");
  122. }
  123. /// <summary>
  124. ///A test for OthersCanRead
  125. ///</summary>
  126. [TestMethod()]
  127. public void OthersCanReadTest()
  128. {
  129. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  130. bool expected = false; // TODO: Initialize to an appropriate value
  131. bool actual;
  132. target.OthersCanRead = expected;
  133. actual = target.OthersCanRead;
  134. Assert.AreEqual(expected, actual);
  135. Assert.Inconclusive("Verify the correctness of this test method.");
  136. }
  137. /// <summary>
  138. ///A test for OthersCanWrite
  139. ///</summary>
  140. [TestMethod()]
  141. public void OthersCanWriteTest()
  142. {
  143. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  144. bool expected = false; // TODO: Initialize to an appropriate value
  145. bool actual;
  146. target.OthersCanWrite = expected;
  147. actual = target.OthersCanWrite;
  148. Assert.AreEqual(expected, actual);
  149. Assert.Inconclusive("Verify the correctness of this test method.");
  150. }
  151. /// <summary>
  152. ///A test for OwnerCanExecute
  153. ///</summary>
  154. [TestMethod()]
  155. public void OwnerCanExecuteTest()
  156. {
  157. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  158. bool expected = false; // TODO: Initialize to an appropriate value
  159. bool actual;
  160. target.OwnerCanExecute = expected;
  161. actual = target.OwnerCanExecute;
  162. Assert.AreEqual(expected, actual);
  163. Assert.Inconclusive("Verify the correctness of this test method.");
  164. }
  165. /// <summary>
  166. ///A test for OwnerCanRead
  167. ///</summary>
  168. [TestMethod()]
  169. public void OwnerCanReadTest()
  170. {
  171. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  172. bool expected = false; // TODO: Initialize to an appropriate value
  173. bool actual;
  174. target.OwnerCanRead = expected;
  175. actual = target.OwnerCanRead;
  176. Assert.AreEqual(expected, actual);
  177. Assert.Inconclusive("Verify the correctness of this test method.");
  178. }
  179. /// <summary>
  180. ///A test for OwnerCanWrite
  181. ///</summary>
  182. [TestMethod()]
  183. public void OwnerCanWriteTest()
  184. {
  185. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  186. bool expected = false; // TODO: Initialize to an appropriate value
  187. bool actual;
  188. target.OwnerCanWrite = expected;
  189. actual = target.OwnerCanWrite;
  190. Assert.AreEqual(expected, actual);
  191. Assert.Inconclusive("Verify the correctness of this test method.");
  192. }
  193. /// <summary>
  194. ///A test for Size
  195. ///</summary>
  196. [TestMethod()]
  197. public void SizeTest()
  198. {
  199. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  200. long expected = 0; // TODO: Initialize to an appropriate value
  201. long actual;
  202. target.Size = expected;
  203. actual = target.Size;
  204. Assert.AreEqual(expected, actual);
  205. Assert.Inconclusive("Verify the correctness of this test method.");
  206. }
  207. /// <summary>
  208. ///A test for UserId
  209. ///</summary>
  210. [TestMethod()]
  211. public void UserIdTest()
  212. {
  213. SftpFileAttributes target = SftpFileAttributes.Empty; // TODO: Initialize to an appropriate value
  214. int expected = 0; // TODO: Initialize to an appropriate value
  215. int actual;
  216. target.UserId = expected;
  217. actual = target.UserId;
  218. Assert.AreEqual(expected, actual);
  219. Assert.Inconclusive("Verify the correctness of this test method.");
  220. }
  221. }
  222. }