2
0

ServiceFactoryTest_CreateClientAuthentication.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. namespace Renci.SshNet.Tests.Classes
  3. {
  4. [TestClass]
  5. public class ServiceFactoryTest_CreateClientAuthentication
  6. {
  7. private ServiceFactory _serviceFactory;
  8. private IClientAuthentication _actual;
  9. private void Arrange()
  10. {
  11. _serviceFactory = new ServiceFactory();
  12. }
  13. [TestInitialize]
  14. public void Initialize()
  15. {
  16. Arrange();
  17. Act();
  18. }
  19. private void Act()
  20. {
  21. _actual = _serviceFactory.CreateClientAuthentication();
  22. }
  23. [TestMethod]
  24. public void CreateClientAuthenticationShouldNotReturnNull()
  25. {
  26. Assert.IsNotNull(_actual);
  27. }
  28. [TestMethod]
  29. public void ClientAuthenticationShouldHavePartialSuccessLimitOf5()
  30. {
  31. var clientAuthentication = _actual as ClientAuthentication;
  32. Assert.IsNotNull(clientAuthentication);
  33. Assert.AreEqual(5, clientAuthentication.PartialSuccessLimit);
  34. }
  35. }
  36. }