Files
PowerShell-PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Get-PSBreakpoint.Tests.ps1
T
James Truher 1e1c4b7dc0 Restructure of pester test layout
This restructuring moves tests to a directory name which matches the module
in which the cmdlet resides which should improve the discoverability of a
specific test.
For tests which are not about cmdlets in a module, new directories have been
created to make those tests easier to find as well
2016-06-29 12:05:41 -07:00

31 lines
941 B
PowerShell

Describe "Get-PSBreakpoint" {
$scriptName = "Get-PSBreakpoint.Tests.ps1"
$fullScriptPath = Join-Path -Path $PSScriptRoot -ChildPath $scriptName
AfterEach {
Get-PSBreakpoint -Script $fullScriptPath | Remove-PSBreakpoint
}
It "should be able to get PSBreakpoint with using Id switch" {
Set-PSBreakpoint -Script $fullScriptPath -Line 1
{ Get-PSBreakpoint -Script $fullScriptPath } | Should Not Throw
$Id = (Get-PSBreakpoint -Script $fullScriptPath).Id
$Id | Should be 0
}
It "sshould be able to get PSBreakpoint with using Variable switch" {
Set-PSBreakpoint -Script $fullScriptPath -Variable "$scriptName"
{ Get-PSBreakpoint -Variable "$scriptName" -Script $fullScriptPath } | Should Not Throw
$Id = (Get-PSBreakpoint -Variable "$scriptName" -Script $fullScriptPath).Variable
$Id | Should be $scriptName
}
}