-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshow-by-property.Tests.ps1
45 lines (35 loc) · 1.82 KB
/
show-by-property.Tests.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Describe 'Show-Applications' {
BeforeAll {
. $PSScriptRoot/../src/show-by-property.ps1
}
It 'Should display a list of all applications' {
$expected = New-Object System.Collections.Generic.List[object]
$expected.AddRange(@("JetBrains", "Gradio", "WSL", "Viber", "Delphi", "Windows", ".NET", "Scoop"))
$result = Show-Applications -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
$result | Should -BeExactly $expected
}
It 'Should display a list of all categories' {
$expected = New-Object System.Collections.Generic.List[object]
$expected.AddRange(@("IDE", "AI", "Windows", "communication", ".NET", "installer"))
$result = Show-Categories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
$result | Should -BeExactly $expected
}
It 'Should display a list of all entity categories' {
$expected = New-Object System.Collections.Generic.List[object]
$expected.AddRange(@("crash log", "temporary files", "log", "telemetry", "cache"))
$result = Show-EntityCategories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
$result | Should -BeExactly $expected
}
It 'Should display a list of all types' {
$expected = New-Object System.Collections.Generic.List[object]
$expected.AddRange(@("file", "directory"))
$result = Show-Types -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
$result | Should -BeExactly $expected
}
It 'Should display a list of all custom categories' {
$expected = New-Object System.Collections.Generic.List[object]
$expected.AddRange(@())
$result = Show-CustomCategories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
$result | Should -BeExactly $expected
}
}