|
|
@@ -13,7 +13,6 @@ namespace Renci.SshNet.Tests.Classes
|
|
|
private ForwardedPortDynamic _forwardedPort;
|
|
|
private IList<EventArgs> _closingRegister;
|
|
|
private IList<ExceptionEventArgs> _exceptionRegister;
|
|
|
- private ObjectDisposedException _actualException;
|
|
|
private IPEndPoint _endpoint;
|
|
|
|
|
|
[TestInitialize]
|
|
|
@@ -47,22 +46,7 @@ namespace Renci.SshNet.Tests.Classes
|
|
|
|
|
|
protected void Act()
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- _forwardedPort.Stop();
|
|
|
- Assert.Fail();
|
|
|
- }
|
|
|
- catch (ObjectDisposedException ex)
|
|
|
- {
|
|
|
- _actualException = ex;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- [TestMethod]
|
|
|
- public void StopShouldThrowObjectDisposedException()
|
|
|
- {
|
|
|
- Assert.IsNotNull(_actualException);
|
|
|
- Assert.AreEqual(_forwardedPort.GetType().FullName, _actualException.ObjectName);
|
|
|
+ _forwardedPort.Stop();
|
|
|
}
|
|
|
|
|
|
[TestMethod]
|