31 lines
1.2 KiB
PowerShell
31 lines
1.2 KiB
PowerShell
. $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 "Format-AlkamiServiceFabricApplicationName" {
|
|
Context "Produces Correct Values" {
|
|
|
|
$name = "Test.Package";
|
|
$version = "2.3.4";
|
|
$environmentName = "QA9000";
|
|
|
|
It "Produces Full Name" {
|
|
$result = Format-AlkamiServiceFabricApplicationName -name $name -version $version -environmentName $environmentName;
|
|
$result | Should -be "QA9000-Test.Package/v2";
|
|
}
|
|
It "Produces Name/Environment Name" {
|
|
$result = Format-AlkamiServiceFabricApplicationName -name $name -environmentName $environmentName;
|
|
$result | Should -be "QA9000-Test.Package";
|
|
}
|
|
It "Produces Name/Version Name" {
|
|
$result = Format-AlkamiServiceFabricApplicationName -name $name -version $version;
|
|
$result | Should -be "Test.Package/v2";
|
|
}
|
|
}
|
|
}
|