PowerShell/docs/cmdlet-example/SendGreeting.Tests.ps1
Andrew Schwartzmeyer 1d96695a63 Update cmdlet-example to use netstandard1.3
As this enables importing the same DLL everywhere.
2016-06-06 11:39:29 -07:00

14 lines
582 B
PowerShell

Describe "Send-Greeting cmdlet" -Tag 'Slow' {
It "Should be able build the cmdlet" {
Remove-Item -Recurse -Force bin -ErrorAction SilentlyContinue
dotnet restore --verbosity Error | Should BeNullOrEmpty
dotnet build | ?{ $_ -match "Compiling SendGreeting for .NETStandard,Version=v1.3" } | Should Not BeNullOrEmpty
}
It "Should be able to use the module" {
Import-Module -ErrorAction Stop ./bin/Debug/netstandard1.3/SendGreeting.dll
Send-Greeting -Name World | Should Be "Hello World!"
Remove-Module SendGreeting
}
}