Public/Import/Import-ISEThemeFile.Tests.ps1
$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' } } } |