@@ -25,7 +25,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
25
25
$script :psScriptInfoName = " test_script"
26
26
$scriptDescription = " this is a test script"
27
27
$script :testScriptFilePath = Join-Path - Path $tmpDir1Path - ChildPath " $script :psScriptInfoName .ps1"
28
- New-PSScriptFile - Path $script :testScriptFilePath - Description $scriptDescription
28
+ New-PSScriptFileInfo - Path $script :testScriptFilePath - Description $scriptDescription
29
29
}
30
30
31
31
AfterEach {
@@ -40,10 +40,10 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
40
40
$scriptFilePath = Join-Path - Path $relativeCurrentPath - ChildPath " $script :psScriptInfoName .ps1"
41
41
$oldDescription = " Old description for test script"
42
42
$newDescription = " New description for test script"
43
- New-PSScriptFile - Path $scriptFilePath - Description $oldDescription
43
+ New-PSScriptFileInfo - Path $scriptFilePath - Description $oldDescription
44
44
45
45
Update-ScriptFileInfo - Path $scriptFilePath - Description $newDescription
46
- Test-PSScriptFile - Path $scriptFilePath | Should - BeTrue
46
+ Test-PSScriptFileInfo - Path $scriptFilePath | Should - BeTrue
47
47
48
48
Test-Path - Path $scriptFilePath | Should - BeTrue
49
49
$results = Get-Content - Path $scriptFilePath - Raw
@@ -63,10 +63,10 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
63
63
$relativeCurrentPath = Get-Location
64
64
$scriptFilePath = Join-Path - Path $relativeCurrentPath - ChildPath " $script :psScriptInfoName .ps1"
65
65
66
- New-PSScriptFile - Path $scriptFilePath - Description $description - Version $version - Author $author - ProjectUri $projectUri
66
+ New-PSScriptFileInfo - Path $scriptFilePath - Description $description - Version $version - Author $author - ProjectUri $projectUri
67
67
Update-ScriptFileInfo - Path $scriptFilePath - Author $newAuthor
68
68
69
- Test-PSScriptFile - Path $scriptFilePath | Should - BeTrue
69
+ Test-PSScriptFileInfo - Path $scriptFilePath | Should - BeTrue
70
70
$results = Get-Content - Path $scriptFilePath - Raw
71
71
$results.Contains ($newAuthor ) | Should - BeTrue
72
72
$results.Contains (" .AUTHOR $newAuthor " ) | Should - BeTrue
@@ -87,7 +87,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
87
87
It " update script file Author property" {
88
88
$author = " New Author"
89
89
Update-ScriptFileInfo - Path $script :testScriptFilePath - Author $author
90
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
90
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
91
91
92
92
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
93
93
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -98,7 +98,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
98
98
It " update script file Version property" {
99
99
$version = " 2.0.0.0"
100
100
Update-ScriptFileInfo - Path $script :testScriptFilePath - Version $version
101
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
101
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
102
102
103
103
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
104
104
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -109,7 +109,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
109
109
It " update script file Version property with prerelease version" {
110
110
$version = " 3.0.0-alpha"
111
111
Update-ScriptFileInfo - Path $script :testScriptFilePath - Version $version
112
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
112
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
113
113
114
114
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
115
115
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -126,7 +126,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
126
126
It " update script file Description property" {
127
127
$description = " this is an updated test script"
128
128
Update-ScriptFileInfo - Path $script :testScriptFilePath - Description $description
129
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
129
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
130
130
131
131
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
132
132
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -137,7 +137,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
137
137
It " update script file Guid property" {
138
138
$guid = [Guid ]::NewGuid();
139
139
Update-ScriptFileInfo - Path $script :testScriptFilePath - Guid $guid
140
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
140
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
141
141
142
142
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
143
143
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -148,7 +148,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
148
148
It " update script file CompanyName property" {
149
149
$companyName = " New Corporation"
150
150
Update-ScriptFileInfo - Path $script :testScriptFilePath - CompanyName $companyName
151
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
151
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
152
152
153
153
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
154
154
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -159,7 +159,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
159
159
It " update script file Copyright property" {
160
160
$copyright = " (c) 2022 New Corporation. All rights reserved"
161
161
Update-ScriptFileInfo - Path $script :testScriptFilePath - Copyright $copyright
162
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
162
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
163
163
164
164
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
165
165
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -171,7 +171,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
171
171
$externalModuleDep1 = " ExternalModuleDep1"
172
172
$externalModuleDep2 = " ExternalModuleDep2"
173
173
Update-ScriptFileInfo - Path $script :testScriptFilePath - ExternalModuleDependencies $externalModuleDep1 , $externalModuleDep2
174
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
174
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
175
175
176
176
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
177
177
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -184,7 +184,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
184
184
$externalScriptDep1 = " ExternalScriptDep1"
185
185
$externalScriptDep2 = " ExternalScriptDep2"
186
186
Update-ScriptFileInfo - Path $script :testScriptFilePath - ExternalScriptDependencies $externalScriptDep1 , $externalScriptDep2
187
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
187
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
188
188
189
189
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
190
190
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -196,7 +196,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
196
196
It " update script file IconUri property" {
197
197
$iconUri = " https://testscript.com/icon"
198
198
Update-ScriptFileInfo - Path $script :testScriptFilePath - IconUri $iconUri
199
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
199
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
200
200
201
201
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
202
202
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -207,7 +207,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
207
207
It " update script file LicenseUri property" {
208
208
$licenseUri = " https://testscript.com/license"
209
209
Update-ScriptFileInfo - Path $script :testScriptFilePath - LicenseUri $licenseUri
210
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
210
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
211
211
212
212
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
213
213
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -218,7 +218,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
218
218
It " update script file ProjectUri property" {
219
219
$projectUri = " https://testscript.com/"
220
220
Update-ScriptFileInfo - Path $script :testScriptFilePath - ProjectUri $projectUri
221
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
221
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
222
222
223
223
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
224
224
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -229,7 +229,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
229
229
It " update script file PrivateData property" {
230
230
$privateData = " this is some private data"
231
231
Update-ScriptFileInfo - Path $script :testScriptFilePath - PrivateData $privateData
232
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
232
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
233
233
234
234
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
235
235
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -240,7 +240,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
240
240
It " update script file ReleaseNotes property" {
241
241
$releaseNotes = " Release notes for script."
242
242
Update-ScriptFileInfo - Path $script :testScriptFilePath - ReleaseNotes $releaseNotes
243
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
243
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
244
244
245
245
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
246
246
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -256,7 +256,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
256
256
$requiredModules = @ ($hashtable1 , $hashtable2 , $hashtable3 , $hashtable4 )
257
257
258
258
Update-ScriptFileInfo - Path $script :testScriptFilePath - RequiredModules $requiredModules
259
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
259
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
260
260
261
261
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
262
262
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -269,7 +269,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
269
269
$requiredScript1 = " RequiredScript1"
270
270
$requiredScript2 = " RequiredScript2"
271
271
Update-ScriptFileInfo - Path $script :testScriptFilePath - RequiredScripts $requiredScript1 , $requiredScript2
272
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
272
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
273
273
274
274
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
275
275
$results = Get-Content - Path $script :testScriptFilePath - Raw
@@ -282,7 +282,7 @@ Describe "Test CompatPowerShellGet: Update-PSScriptFileInfo" -tags 'CI' {
282
282
$tag1 = " tag1"
283
283
$tag2 = " tag2"
284
284
Update-ScriptFileInfo - Path $script :testScriptFilePath - Tags $tag1 , $tag2
285
- Test-PSScriptFile $script :testScriptFilePath | Should - Be $true
285
+ Test-PSScriptFileInfo $script :testScriptFilePath | Should - Be $true
286
286
287
287
Test-Path - Path $script :testScriptFilePath | Should - BeTrue
288
288
$results = Get-Content - Path $script :testScriptFilePath - Raw
0 commit comments