@@ -8,7 +8,7 @@ Describe "Correction Extent" {
8
8
9
9
Context " Object construction" {
10
10
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"
12
12
13
13
$correctionExtent.StartLineNumber | Should Be 1
14
14
$correctionExtent.EndLineNumber | Should Be 1
@@ -18,17 +18,15 @@ Describe "Correction Extent" {
18
18
$correctionExtent.File | Should Be " newfile"
19
19
$correctionExtent.Description | Should Be " cool description"
20
20
}
21
-
21
+
22
22
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"
25
25
}
26
-
26
+
27
27
It " throws if end column number is less than start column number for same line" {
28
28
$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"
30
30
}
31
31
}
32
- }
33
-
34
-
32
+ }
0 commit comments