We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
[ArrayList]::new()
using namespace System.Collections
1 parent 973d2e7 commit 14ed9f5Copy full SHA for 14ed9f5
1 file changed
Tests/Rules/AvoidUsingArrayList.tests.ps1
@@ -197,6 +197,14 @@ Describe "AvoidArrayList" {
197
$violations | Should -BeNullOrEmpty
198
}
199
200
+ It "new()" {
201
+ $scriptDefinition = {
202
+ $List = [ArrayList]::new()
203
+ }.ToString()
204
+ $violations = Invoke-ScriptAnalyzer -ScriptDefinition $scriptDefinition -Settings $Settings
205
+ $violations | Should -BeNullOrEmpty
206
+ }
207
+
208
It "Out of the namespace scope" {
209
$scriptDefinition = $usingGeneric + {
210
$List = New-Object ArrayList
0 commit comments