@@ -8,7 +8,7 @@ Describe "Correction Extent" {
88
99 Context " Object construction" {
1010 It " creates the object with correct properties" {
11- $correctionExtent = $type ::new( 1 , 1 , 1 , 3 , " get-childitem" , " newfile" , " cool description" )
11+ $correctionExtent = $obj = New-Object - TypeName $type - ArgumentList 1 , 1 , 1 , 3 , " get-childitem" , " newfile" , " cool description"
1212
1313 $correctionExtent.StartLineNumber | Should Be 1
1414 $correctionExtent.EndLineNumber | Should Be 1
@@ -18,17 +18,15 @@ Describe "Correction Extent" {
1818 $correctionExtent.File | Should Be " newfile"
1919 $correctionExtent.Description | Should Be " cool description"
2020 }
21-
21+
2222 It " throws if end line number is less than start line number" {
23- $text = " Get-ChildItem"
24- { $type ::new (2 , 1 , 1 , $text.Length + 1 , $text , " newfile" )} | Should Throw " start line number"
23+ $text = " Get-ChildItem"
24+ { New-Object - TypeName $type - ArgumentList @ (2 , 1 , 1 , $text.Length + 1 , $text , " newfile" )} | Should Throw " start line number"
2525 }
26-
26+
2727 It " throws if end column number is less than start column number for same line" {
2828 $text = " start-process"
29- { $type ::new (1 , 1 , 2 , 1 , $text , " newfile" )} | Should Throw " start column number"
29+ { New-Object - TypeName $type - ArgumentList @ (1 , 1 , 2 , 1 , $text , " newfile" )} | Should Throw " start column number"
3030 }
3131 }
32- }
33-
34-
32+ }
0 commit comments