Resources/Module/src/Tests/Unit/PSModule-Module.Tests.ps1

#-------------------------------------------------------------------------
Set-Location -Path $PSScriptRoot
#-------------------------------------------------------------------------
$ModuleName = '<%=$PLASTER_PARAM_ModuleName%>'
$PathToManifest = [System.IO.Path]::Combine('..', '..', $ModuleName, "$ModuleName.psd1")
$PathToModule = [System.IO.Path]::Combine('..', '..', $ModuleName, "$ModuleName.psm1")
#-------------------------------------------------------------------------
Describe 'Module Tests' -Tag Unit {
    Context "Module Tests" {
        It 'Passes Test-ModuleManifest' {
            Test-ModuleManifest -Path $PathToManifest | Should Not BeNullOrEmpty
            $? | Should Be $true
        }#manifestTest
        It 'root module <%=$PLASTER_PARAM_ModuleName%>.psm1 should exist' {
            $PathToModule | Should Exist
            $? | Should Be $true
        }#psm1Exists
        It 'manifest should contain <%=$PLASTER_PARAM_ModuleName%>.psm1' {
            $PathToManifest |
                Should -FileContentMatchExactly "<%=$PLASTER_PARAM_ModuleName%>.psm1"
        }#validPSM1
    }#context_ModuleTests
}#describe_ModuleTests