tests/AttunixMSPTools.tests.ps1
# set working path $pathtest = Split-Path $MyInvocation.MyCommand.path -Parent Set-Location $pathtest # get public functions to ensure that they're being exported correctly in meta context $publicfunctions = @() $functions = Get-ChildItem ..\public $functions.name | ForEach-Object { $split = $_.split('.') $publicfunctions += $split[0] } # end config, start unit-tests. # All tests for AttunixMSPTools module Describe AttunixMSPTools { # meta tests for module Context meta { It "Should Import" { { Import-Module ..\AttunixMSPTools -ErrorAction Stop } | Should Not Throw } $module = Get-Module AttunixMSPTools $publicfunctions | ForEach-Object { It "Should export function ' $_ ' in public folder" { $module.ExportedCommands.Keys -contains $_ | Should Be $true } } } # todo: unit tests for function Context Set-AzureVMSize { } # todo: unit tests for function Context Set-AzureResourceTags { } # todo: unit tests for function Context Get-AzureEmptyResourceGroups { } # todo: unit tests for function Context New-ZendeskOrganization { } # todo: unit test for function Context New-AzureOMSSavedSearchCollection { } # todo: unit test for function Context Compile-AzureDSCConfig { } # todo: unit test for function Context Register-AzureDSCNode { } # todo: unit test for function Context Enable-AzureNSGDiagnostics { } } |