Add tests for cmdlet example

This commit is contained in:
Andrew Schwartzmeyer committed 2016-05-04 12:13:00 -07:00
1 parent 07a615e283
commit 4619d0d7ba
2 files changed
+19

No files matched your search

@@ -0,0 +1,13 @@
Describe "Send-Greeting cmdlet" {
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.5" } | Should Not BeNullOrEmpty
}
It "Should be able to use the module" {
Import-Module -ErrorAction Stop ./bin/Debug/netstandard1.5/SendGreeting.dll
Send-Greeting -Name World | Should Be "Hello World!"
Remove-Module SendGreeting
}
}