Tests/Functions/Private/GetResourcePlans.tests.ps1
# load the module Import-Module PSOnebyte -Force # run tests # note: the Get-RandomItemsCount function is private (non-exported). # in order for Pester to test this function, use the 'InModuleScope' wrapper around the test. InModuleScope PSOnebyte { Describe "GetResourcePlans private function tests" { Context "Basic functionality" { It "Function can be loaded." { { Get-Help GetResourcePlans -ErrorAction Stop } | Should Not Throw } It "Returns a HashTable" { $plans = GetResourcePlans $plans | Should Not Be $null $plans.GetType().FullName | Should Be 'System.Collections.HashTable' } } } } |