You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
using HttpClientStudy.Core.Utilities;
|
|
|
|
|
|
|
|
|
|
namespace HttpClientStudy.UnitTest.UtilitiesTest
|
|
|
|
|
{
|
|
|
|
|
public class CmdUtilityTest
|
|
|
|
|
{
|
|
|
|
|
private readonly ITestOutputHelper _output;
|
|
|
|
|
public CmdUtilityTest(ITestOutputHelper testOutput)
|
|
|
|
|
{
|
|
|
|
|
_output = testOutput;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void Test()
|
|
|
|
|
{
|
|
|
|
|
string cmd = "netstat -ano | findstr 127.0.0.1";
|
|
|
|
|
|
|
|
|
|
var result = CmdUtility.RunCmd(cmd);
|
|
|
|
|
|
|
|
|
|
_output.WriteLine(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|