Skip to content

Commit

Permalink
Fix embarrassing last-minute test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob-Hague committed Mar 9, 2024
1 parent 49fdfee commit 19f9d2f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ protected override void Act()
[TestMethod]
public void ConnectShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format(CultureInfo.InvariantCulture, "Socket read operation has timed out after {0:F0} milliseconds.", _connectionInfo.Timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ protected override void Act()
[TestMethod]
public void ConnectShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format(CultureInfo.InvariantCulture, "Socket read operation has timed out after {0:F0} milliseconds.", _connectionInfo.Timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ protected void Act()
[TestMethod]
public void StartShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNotNull(_actualException);
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format("Socket read operation has timed out after {0} milliseconds.", _timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ protected override void Act()
[TestMethod]
public void ConnectShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format(CultureInfo.InvariantCulture, "Socket read operation has timed out after {0:F0} milliseconds.", _connectionInfo.Timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ protected override void Act()
[TestMethod]
public void ConnectShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format(CultureInfo.InvariantCulture, "Socket read operation has timed out after {0:F0} milliseconds.", _connectionInfo.Timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ protected override void Act()
[TestMethod]
public void ConnectShouldHaveThrownSshOperationTimeoutException()
{
Assert.IsNull(_actualException.InnerException);
Assert.IsInstanceOfType<SshOperationTimeoutException>(_actualException);
Assert.IsInstanceOfType<SocketException>(_actualException.InnerException);
Assert.AreEqual(string.Format(CultureInfo.InvariantCulture, "Socket read operation has timed out after {0:F0} milliseconds.", _connectionInfo.Timeout.TotalMilliseconds), _actualException.Message);
}

Expand Down

0 comments on commit 19f9d2f

Please sign in to comment.