Files
PowerShell/test/powershell/Get-PSBreakpoint.Tests.ps1
T

30 lines
941 B
PowerShell
Raw Normal View History

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