Skip to content

Commit

Permalink
feat: Out-JSON ( Fixes #727 )
Browse files Browse the repository at this point in the history
    Adding Example
  • Loading branch information
StartAutomating authored and StartAutomating committed Mar 9, 2024
1 parent 46a70b6 commit 3f31cc6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Tests/Examples/Template.PipeScript.ProxyCommand.examples.tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

describe 'Template.PipeScript.ProxyCommand' {
it 'Template.PipeScript.ProxyCommand Example 1' {
.\ProxyCommand.psx.ps1 -CommandName Get-Process
}
it 'Template.PipeScript.ProxyCommand Example 2' {
{
function [ProxyCommand<'Get-Process'>]GetProcessProxy {}
} | .>PipeScript
}
it 'Template.PipeScript.ProxyCommand Example 3' {
.>ProxyCommand -CommandName Get-Process -RemoveParameter *
}
it 'Template.PipeScript.ProxyCommand Example 4' {
Invoke-PipeScript -ScriptBlock {[ProxyCommand('Get-Process')]param()}
}
it 'Template.PipeScript.ProxyCommand Example 5' {
Invoke-PipeScript -ScriptBlock {
[ProxyCommand('Get-Process',
RemoveParameter='*',
DefaultParameter={
@{id='$pid'}
})]
param()
}
}
it 'Template.PipeScript.ProxyCommand Example 6' {
{
function Get-MyProcess {
[ProxyCommand('Get-Process',
RemoveParameter='*',
DefaultParameter={
@{id='$pid'}
})]
param()
}
} | .>PipeScript
}
}

0 comments on commit 3f31cc6

Please sign in to comment.