SemaphoreLightTest.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using Renci.SshNet.Common;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. using System;
  4. using Renci.SshNet.Tests.Common;
  5. namespace Renci.SshNet.Tests.Classes.Common
  6. {
  7. /// <summary>
  8. ///This is a test class for SemaphoreLightTest and is intended
  9. ///to contain all SemaphoreLightTest Unit Tests
  10. ///</summary>
  11. [TestClass()]
  12. public class SemaphoreLightTest : TestBase
  13. {
  14. /// <summary>
  15. ///A test for SemaphoreLight Constructor
  16. ///</summary>
  17. [TestMethod()]
  18. public void SemaphoreLightConstructorTest()
  19. {
  20. int initialCount = 0; // TODO: Initialize to an appropriate value
  21. SemaphoreLight target = new SemaphoreLight(initialCount);
  22. Assert.Inconclusive("TODO: Implement code to verify target");
  23. }
  24. /// <summary>
  25. ///A test for Release
  26. ///</summary>
  27. [TestMethod()]
  28. public void ReleaseTest()
  29. {
  30. int initialCount = 0; // TODO: Initialize to an appropriate value
  31. SemaphoreLight target = new SemaphoreLight(initialCount); // TODO: Initialize to an appropriate value
  32. int expected = 0; // TODO: Initialize to an appropriate value
  33. int actual;
  34. actual = target.Release();
  35. Assert.AreEqual(expected, actual);
  36. Assert.Inconclusive("Verify the correctness of this test method.");
  37. }
  38. /// <summary>
  39. ///A test for Release
  40. ///</summary>
  41. [TestMethod()]
  42. public void ReleaseTest1()
  43. {
  44. int initialCount = 0; // TODO: Initialize to an appropriate value
  45. SemaphoreLight target = new SemaphoreLight(initialCount); // TODO: Initialize to an appropriate value
  46. int releaseCount = 0; // TODO: Initialize to an appropriate value
  47. int expected = 0; // TODO: Initialize to an appropriate value
  48. int actual;
  49. actual = target.Release(releaseCount);
  50. Assert.AreEqual(expected, actual);
  51. Assert.Inconclusive("Verify the correctness of this test method.");
  52. }
  53. /// <summary>
  54. ///A test for Wait
  55. ///</summary>
  56. [TestMethod()]
  57. public void WaitTest()
  58. {
  59. int initialCount = 0; // TODO: Initialize to an appropriate value
  60. SemaphoreLight target = new SemaphoreLight(initialCount); // TODO: Initialize to an appropriate value
  61. target.Wait();
  62. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  63. }
  64. /// <summary>
  65. ///A test for CurrentCount
  66. ///</summary>
  67. [TestMethod()]
  68. public void CurrentCountTest()
  69. {
  70. int initialCount = 0; // TODO: Initialize to an appropriate value
  71. SemaphoreLight target = new SemaphoreLight(initialCount); // TODO: Initialize to an appropriate value
  72. int actual;
  73. actual = target.CurrentCount;
  74. Assert.Inconclusive("Verify the correctness of this test method.");
  75. }
  76. }
  77. }