Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Jan 1, 2024
1 parent db3d889 commit e036266
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions IPTables.Net.TestFramework/MockIptablesSystemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public ISystemProcess StartProcess(string command, string arguments)
var exe = new KeyValuePair<string, string>(command, arguments);
ExecutionLog.Add(exe);
StreamReader output = null, error = null;
if (MockOutputs.ContainsKey(exe))
if (MockOutputs.TryGetValue(exe, out var mo))
{
if(MockOutputs[exe].Length >= 1)
if(mo.Length >= 1)
{
output = MockOutputs[exe][0];
output = mo[0];
}
if (MockOutputs[exe].Length >= 2)
{
error = MockOutputs[exe][1];
error = mo[1];
}
}
else if(_strict)
Expand Down
2 changes: 1 addition & 1 deletion IPTables.Net.TestFramework/MockIptablesSystemProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace IPTables.Net.TestFramework
{
public class MockIptablesSystemProcess : ISystemProcess
{
private ProcessStartInfo _startInfo = new ProcessStartInfo();
private ProcessStartInfo _startInfo = new ProcessStartInfo { UseShellExecute = false };
private Thread _outputReader;
private Thread _errorReader;

Expand Down
2 changes: 1 addition & 1 deletion IPTables.Net.Tests/IPTables.Net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="SystemInteract.Local" Version="1.1.3" />
<PackageReference Include="SystemInteract.Local" Version="1.1.4-cibuild0005" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions IPTables.Net/IPTables.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

<ItemGroup>
<PackageReference Include="Dynamitey" Version="2.0.10.189" />
<PackageReference Include="IPNetwork2" Version="2.6.609">
<PackageReference Include="IPNetwork2" Version="2.6.618">
<Aliases>IPNetwork2</Aliases>
</PackageReference>
<PackageReference Include="SystemInteract" Version="1.1.4-cibuild0001" />
<PackageReference Include="SystemInteract" Version="1.1.4-cibuild0005" />
</ItemGroup>

</Project>

0 comments on commit e036266

Please sign in to comment.