Public/ModuleHelpers/Module.Functions.Tests.ps1

#Requires -RunAsAdministrator
#Requires -Version 5.0
#Requires -Modules @{ ModuleName="Pester"; ModuleVersion="4.10.1" }
$ErrorActionPreference = "Stop";
Set-StrictMode -Version 'Latest'

$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.ps1', '.psm1'
Import-Module "$PSScriptRoot\$sut" -Force


# # NOTE: This test depends on the presence of an EXE/installer
# # DANGER: This test will remove a specified service from your machine
# Describe 'InstallService' {
# # Arrange
# [string] $expected = 'Stopped'
# [string] $serviceName = 'TrainingNotifier_Test'

# [string] $pathToExe = "$PSScriptRoot\Fixtures\TN.Service\AppService.exe"
# # Act
# InstallService -svcName $serviceName -pathToExe $pathToExe

# [System.ServiceProcess.ServiceController] $svc = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
# [string] $actual = if ($null -ne $svc) { $svc.Status } else { '' }

# # Assert
# It 'returns expected' {
# $actual | Should Be $expected
# }
# }