Browse Source

Minor code cleanup.

Gert Driesen 7 years ago
parent
commit
13bef36d38

+ 7 - 6
src/Renci.SshNet.Tests/Common/TestBase.cs

@@ -8,17 +8,18 @@ namespace Renci.SshNet.Tests.Common
     [TestClass]
     public abstract class TestBase
     {
-        private static Assembly _executingAssembly = Assembly.GetExecutingAssembly();
-        [TestInitialize()]
+        private static readonly Assembly ExecutingAssembly = Assembly.GetExecutingAssembly();
+
+        [TestInitialize]
         public void Init()
         {
-            this.OnInit();
+            OnInit();
         }
 
-        [TestCleanup()]
+        [TestCleanup]
         public void Cleanup()
         {
-            this.OnCleanup();
+            OnCleanup();
         }
 
         protected virtual void OnInit()
@@ -50,7 +51,7 @@ namespace Renci.SshNet.Tests.Common
 
         protected Stream GetData(string name)
         {
-            return _executingAssembly.GetManifestResourceStream(string.Format("Renci.SshNet.Tests.Data.{0}", name));
+            return ExecutingAssembly.GetManifestResourceStream(string.Format("Renci.SshNet.Tests.Data.{0}", name));
         }
     }
 }

+ 2 - 0
src/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj

@@ -226,6 +226,7 @@
     <Compile Include="Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs" />
     <Compile Include="Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupBuilder.cs" />
     <Compile Include="Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyBuilder.cs" />
+    <Compile Include="Classes\NetConfClientTest_Connect_NetConfSessionConnectFailure.cs" />
     <Compile Include="Classes\NetConfClientTest_Dispose_Connected.cs" />
     <Compile Include="Classes\NetConfClientTest_Dispose_Disconnected.cs" />
     <Compile Include="Classes\NetConfClientTest_Dispose_Disposed.cs" />
@@ -384,6 +385,7 @@
     <Compile Include="Classes\SessionTest.cs" />
     <Compile Include="Classes\SftpClientTest.ChangeDirectory.cs" />
     <Compile Include="Classes\SftpClientTest.Connect.cs" />
+    <Compile Include="Classes\SftpClientTest_Connect_SftpSessionConnectFailure.cs" />
     <Compile Include="Classes\SftpClientTest_Dispose_Connected.cs" />
     <Compile Include="Classes\SftpClientTest_Dispose_Disconnected.cs" />
     <Compile Include="Classes\SftpClientTest_Dispose_Disposed.cs" />