mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Remove deprecated Listener tests
This commit is contained in:
1 parent
4234b3db73
commit
0012fa90d6
1 file changed
-49
@@ -62,55 +62,6 @@ namespace PSTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestRunspaceWithPowerShellAndHost()
|
||||
{
|
||||
Listener listener = new Listener("", false, false);
|
||||
MyHost myHost = new MyHost(listener);
|
||||
using (var runspace = RunspaceFactory.CreateRunspace(myHost))
|
||||
{
|
||||
runspace.Open();
|
||||
|
||||
using (PowerShell powerShell = PowerShell.Create())
|
||||
{
|
||||
powerShell.Runspace = runspace;
|
||||
|
||||
powerShell.AddScript(script);
|
||||
|
||||
int objCount = 0;
|
||||
foreach (var result in powerShell.Invoke())
|
||||
{
|
||||
++objCount;
|
||||
Assert.NotNull(result);
|
||||
}
|
||||
Assert.Equal(count, objCount);
|
||||
}
|
||||
|
||||
runspace.Close();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestRunspaceWithFunction()
|
||||
{
|
||||
Listener listener = new Listener("", false, false);
|
||||
MyHost myHost = new MyHost(listener);
|
||||
using (var runspace = RunspaceFactory.CreateRunspace(myHost))
|
||||
{
|
||||
runspace.Open();
|
||||
|
||||
using (PowerShell powerShell = PowerShell.Create())
|
||||
{
|
||||
powerShell.Runspace = runspace;
|
||||
|
||||
powerShell.AddScript("{1}.Invoke()");
|
||||
powerShell.Invoke();
|
||||
}
|
||||
|
||||
runspace.Close();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestRunspaceWithPowerShellAndInitialSessionState()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user