1
1
2
2
$testModuleDir = (Resolve-Path - Path (Join-Path - Path $env: BHProjectPath - ChildPath TestArtifacts)).Path
3
3
4
- Describe " OperationValidation Module Tests" {
4
+ Describe ' OperationValidation Module Tests' {
5
5
6
6
BeforeAll {
7
7
$pathSeparator = [IO.Path ]::PathSeparator
8
8
$SavedModulePath = $env: PSModulePath
9
- if ( $env: PSModulePath.split ($pathSeparator ) -notcontains $testModuleDir ) {
9
+ if ($env: PSModulePath.split ($pathSeparator ) -notcontains $testModuleDir ) {
10
10
$env: PSModulePath += ($pathSeparator + $testModuleDir )
11
11
}
12
12
if ($env: PSModulePath.Split ($pathSeparator ) -notcontains $env: BHModulePath ) {
@@ -22,63 +22,60 @@ Describe "OperationValidation Module Tests" {
22
22
Remove-Module OperationValidation
23
23
}
24
24
25
- Context " Get-OperationValidation parameters" {
26
- It " ModuleName parameter is proper type" {
25
+ Context ' Get-OperationValidation parameters' {
26
+ It ' ModuleName parameter is proper type' {
27
27
$commands [0 ].Parameters[' Name' ].ParameterType | Should be ([System.String []])
28
28
}
29
- It " Version parameter is proper type" {
29
+ It ' Version parameter is proper type' {
30
30
$commands [0 ].Parameters[' Version' ].ParameterType | Should be ([System.Version ])
31
31
}
32
- It " TestType parameter is proper type" {
32
+ It ' TestType parameter is proper type' {
33
33
$commands [0 ].Parameters[' TestType' ].ParameterType | Should be ([System.String []])
34
34
}
35
- It " Tag parameter is property type" {
35
+ It ' Tag parameter is property type' {
36
36
$commands [0 ].Parameters[' Tag' ].ParameterType | Should be ([System.String []])
37
37
}
38
- It " ExcludeTag parameter is property type" {
38
+ It ' ExcludeTag parameter is property type' {
39
39
$commands [0 ].Parameters[' Tag' ].ParameterType | Should be ([System.String []])
40
40
}
41
- It " TestType parameter has proper constraints" {
41
+ It ' TestType parameter has proper constraints' {
42
42
$Commands [0 ].Parameters[' TestType' ].Attributes.ValidValues.Count | should be 2
43
- $Commands [0 ].Parameters[' TestType' ].Attributes.ValidValues -eq " Simple" | Should be " Simple"
44
- $Commands [0 ].Parameters[' TestType' ].Attributes.ValidValues -eq " Comprehensive" | Should be " Comprehensive"
43
+ $Commands [0 ].Parameters[' TestType' ].Attributes.ValidValues -eq ' Simple' | Should be ' Simple'
44
+ $Commands [0 ].Parameters[' TestType' ].Attributes.ValidValues -eq ' Comprehensive' | Should be ' Comprehensive'
45
45
}
46
46
}
47
- Context " Invoke-OperationValidation parameters" {
48
- It " TestFilePath parameter is proper type" {
47
+ Context ' Invoke-OperationValidation parameters' {
48
+ It ' TestFilePath parameter is proper type' {
49
49
$commands [1 ].Parameters[' TestFilePath' ].ParameterType | Should be ([System.String []])
50
50
}
51
- It " TestInfo parameter is proper type" {
51
+ It ' TestInfo parameter is proper type' {
52
52
$commands [1 ].Parameters[' TestInfo' ].ParameterType | Should be ([System.Management.Automation.PSObject []])
53
53
}
54
- It " ModuleName parameter is proper type" {
54
+ It ' ModuleName parameter is proper type' {
55
55
$commands [1 ].Parameters[' ModuleName' ].ParameterType | Should be ([System.String []])
56
56
}
57
- It " Version parameter is proper type" {
57
+ It ' Version parameter is proper type' {
58
58
$commands [1 ].Parameters[' Version' ].ParameterType | Should be ([System.Version ])
59
59
}
60
- It " Overrides parameter is proper type" {
60
+ It ' Overrides parameter is proper type' {
61
61
$commands [1 ].Parameters[' Overrides' ].ParameterType | Should be ([System.Collections.Hashtable ])
62
62
}
63
- It " IncludePesterOutput is proper type" {
63
+ It ' IncludePesterOutput is proper type' {
64
64
$commands [1 ].Parameters[' IncludePesterOutput' ].ParameterType | Should be ([System.Management.Automation.SwitchParameter ])
65
65
}
66
- It " TestType parameter is proper type" {
66
+ It ' TestType parameter is proper type' {
67
67
$commands [1 ].Parameters[' TestType' ].ParameterType | Should be ([System.String []])
68
68
}
69
- It " Tag parameter is proper type" {
69
+ It ' Tag parameter is proper type' {
70
70
$commands [1 ].Parameters[' Tag' ].ParameterType | Should be ([System.String []])
71
71
}
72
- It " ExcludeTag parameter is proper type" {
72
+ It ' ExcludeTag parameter is proper type' {
73
73
$commands [1 ].Parameters[' ExcludeTag' ].ParameterType | Should be ([System.String []])
74
74
}
75
- It " TestType parameter has proper constraints" {
75
+ It ' TestType parameter has proper constraints' {
76
76
$Commands [1 ].Parameters[' TestType' ].Attributes.ValidValues.Count | should be 2
77
- $Commands [1 ].Parameters[' TestType' ].Attributes.ValidValues -eq " Simple" | Should be " Simple"
78
- $Commands [1 ].Parameters[' TestType' ].Attributes.ValidValues -eq " Comprehensive" | Should be " Comprehensive"
77
+ $Commands [1 ].Parameters[' TestType' ].Attributes.ValidValues -eq ' Simple' | Should be ' Simple'
78
+ $Commands [1 ].Parameters[' TestType' ].Attributes.ValidValues -eq ' Comprehensive' | Should be ' Comprehensive'
79
79
}
80
80
}
81
-
82
-
83
-
84
81
}
0 commit comments