Public/Set/Set-ISEColor.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$function = Get-Command -Name Set-ISEColor
Describe 'Set-ISEColor Tests' {
   Context 'Parameters for Set-ISEColor'{
It 'Has a parameter called Cooler' {
            $function.Parameters.Keys.Contains('Cooler') | Should Be 'True'
            }
        It 'Cooler Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Cooler.Attributes.Mandatory | Should be 'True'
            }
        It 'Cooler Parameter is of SwitchParameter Type' {
            $function.Parameters.Cooler.ParameterType.FullName | Should be 'System.Management.Automation.SwitchParameter'
            }

It 'Has a parameter called Warmer' {
            $function.Parameters.Keys.Contains('Warmer') | Should Be 'True'
            }
        It 'Warmer Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Warmer.Attributes.Mandatory | Should be 'True'
            }
        It 'Warmer Parameter is of SwitchParameter Type' {
            $function.Parameters.Warmer.ParameterType.FullName | Should be 'System.Management.Automation.SwitchParameter'
            }

It 'Has a parameter called Greener' {
            $function.Parameters.Keys.Contains('Greener') | Should Be 'True'
            }
        It 'Greener Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Greener.Attributes.Mandatory | Should be 'True'
            }
        It 'Greener Parameter is of SwitchParameter Type' {
            $function.Parameters.Greener.ParameterType.FullName | Should be 'System.Management.Automation.SwitchParameter'
            }

It 'Has a parameter called Darker' {
            $function.Parameters.Keys.Contains('Darker') | Should Be 'True'
            }
        It 'Darker Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Darker.Attributes.Mandatory | Should be 'True'
            }
        It 'Darker Parameter is of SwitchParameter Type' {
            $function.Parameters.Darker.ParameterType.FullName | Should be 'System.Management.Automation.SwitchParameter'
            }

It 'Has a parameter called Lighter' {
            $function.Parameters.Keys.Contains('Lighter') | Should Be 'True'
            }
        It 'Lighter Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Lighter.Attributes.Mandatory | Should be 'True'
            }
        It 'Lighter Parameter is of SwitchParameter Type' {
            $function.Parameters.Lighter.ParameterType.FullName | Should be 'System.Management.Automation.SwitchParameter'
            }

It 'Has a parameter called Degree' {
            $function.Parameters.Keys.Contains('Degree') | Should Be 'True'
            }
        It 'Degree Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.Degree.Attributes.Mandatory | Should be 'False'
            }
        It 'Degree Parameter is of Int32 Type' {
            $function.Parameters.Degree.ParameterType.FullName | Should be 'System.Int32'
            }

      }

 }