. $PSScriptRoot\..\..\Load-PesterModules.ps1 $here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.tests\.', '.' $functionPath = Join-Path -Path $here -ChildPath $sut Write-Host "Overriding SUT: $functionPath" Import-Module $functionPath -Force $moduleForMock = "" Describe "Test-IsServiceManifestCore" { $global:manifestCore = @" _replaceME_ "@ Context "manifest is not null" { It "runtime is dotnetcore" { $manifest = $manifestCore.Replace("_replaceME_", "dotnetcore") $packageManifest = (([xml]($manifest.Clone())).SelectNodes('//packageManifest')) Test-IsServiceManifestCore -ServiceManifest $packageManifest | Should -BeTrue } It "runtime is core" { $manifest = $manifestCore.Replace("_replaceME_", "core") $packageManifest = (([xml]($manifest.Clone())).SelectNodes('//packageManifest')) Test-IsServiceManifestCore -ServiceManifest $packageManifest | Should -BeTrue } It "runtime is not core" { $manifest = $manifestCore.Replace("_replaceME_", "blarg") $packageManifest = (([xml]($manifest.Clone())).SelectNodes('//packageManifest')) Test-IsServiceManifestCore -ServiceManifest $packageManifest | Should -BeFalse } } }