1+ # WIP
2+ <#
3+ Describe 'Test-ParamSets Detailed Tests' {
4+ Context 'Validates Name Parameter Set' {
5+ It 'Outputs correct parameter set name' {
6+ $result = Test-ParamSets -Name 'John' -Surname 'Doe' -Decimal
7+ $result | Should -Contain 'Set name is: Name'
8+ }
9+
10+ It 'Validates output with Name and Surname' {
11+ $result = Test-ParamSets -Name 'John' -Surname 'Doe' -Decimal
12+ $result | Should -Contain 'Name is: [John], ID is []'
13+ }
14+
15+ It 'Detects Name parameter set with Verbose logging' {
16+ $result = & { Test-ParamSets -Name 'John' -Surname 'Doe' -Decimal -Verbose } 4>&1
17+ $result | Should -Match 'IF detected Name'
18+ }
19+ }
20+
21+ Context 'Validates ID Parameter Set' {
22+ It 'Outputs correct parameter set name' {
23+ $result = Test-ParamSets -ID '1234' -Hexidecimal
24+ $result | Should -Contain 'Set name is: ID'
25+ }
26+
27+ It 'Validates output with ID and empty Name' {
28+ $result = Test-ParamSets -ID '1234' -Hexidecimal
29+ $result | Should -Contain 'Name is: [], ID is [1234]'
30+ }
31+
32+ It 'Detects ID parameter set with Verbose logging' {
33+ $result = & { Test-ParamSets -ID '1234' -Hexidecimal -Verbose } 4>&1
34+ $result | Should -Match 'IF detected ID'
35+ }
36+ }
37+
38+ Context 'Invalid Parameter Combinations' {
39+ It 'Throws error when Name and ID are used together' {
40+ { Test-ParamSets -Name 'John' -ID '1234' } | Should -Throw -ErrorMessage "Cannot use both 'Name' and 'ID' parameters together."
41+ }
42+ }
43+ }
44+ #>
0 commit comments