SessionTest_Connecting_ServerNotResetSequenceNumberAfterNewKeys_StrictKex.cs 898 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Common;
  3. using Renci.SshNet.Messages.Transport;
  4. namespace Renci.SshNet.Tests.Classes
  5. {
  6. [TestClass]
  7. public class SessionTest_Connecting_ServerNotResetSequenceNumberAfterNewKeys_StrictKex : SessionTest_ConnectingBase
  8. {
  9. protected override bool ServerSupportsStrictKex
  10. {
  11. get
  12. {
  13. return true;
  14. }
  15. }
  16. protected override bool ServerResetsSequenceAfterSendingNewKeys
  17. {
  18. get
  19. {
  20. return false;
  21. }
  22. }
  23. [TestMethod]
  24. public void ShouldThrowSshConnectionException()
  25. {
  26. var reason = Assert.ThrowsException<SshConnectionException>(Session.Connect).DisconnectReason;
  27. Assert.AreEqual(DisconnectReason.MacError, reason);
  28. }
  29. }
  30. }