Minor code cleanup.

This commit is contained in:
Gert Driesen
2018-07-22 21:15:29 +02:00
parent cbefe876dd
commit 13bef36d38
2 changed files with 9 additions and 6 deletions
+7 -6
View File
@@ -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));
}
}
}
@@ -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" />