Add all other common module files

This commit is contained in:
Kevin Marquette
2018-07-14 11:17:09 -07:00
parent 01a9c11c8b
commit d26917f9af
7 changed files with 308 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
$Script:ModuleName = 'LDTestFramework'
$Script:ModuleRoot = Split-Path -Path $PSScriptRoot -Parent
Describe "Public commands have comment-based or external help" -Tags 'Build' {
$functions = Get-Command -Module $ModuleName
$help = foreach ($function in $functions) {
Get-Help -Name $function.Name
}
foreach ($node in $help)
{
Context $node.Name {
It "Should have a Description or Synopsis" -Pending {
($node.Description + $node.Synopsis) | Should Not BeNullOrEmpty
}
It "Should have an Example" -Pending {
$node.Examples | Should Not BeNullOrEmpty
}
foreach ($parameter in $node.Parameters.Parameter)
{
if ($parameter -notmatch 'WhatIf|Confirm')
{
It "Should have a Description for Parameter [$($parameter.Name)]" -Pending {
$parameter.Description.Text | Should Not BeNullOrEmpty
}
}
}
}
}
}