Public/Import/Import-ISEThemeFile.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
$function = Get-Command -Name Import-ISEThemeFile
Describe 'Import-ISEThemeFile Tests' {
   Context 'Parameters for Import-ISEThemeFile'{
It 'Has a parameter called FileName' {
            $function.Parameters.Keys.Contains('FileName') | Should Be 'True'
            }
        It 'FileName Parameter is Correctly Identified as being Mandatory' {
            $function.Parameters.FileName.Attributes.Mandatory | Should be 'True'
            }
        It 'FileName Parameter is of Object Type' {
            $function.Parameters.FileName.ParameterType.FullName | Should be 'System.Object'
            }

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

      }

 }