Skip to content

Commit

Permalink
Tests for New-BTVisual
Browse files Browse the repository at this point in the history
  • Loading branch information
Windos committed Feb 4, 2019
1 parent c641866 commit 9684108
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions Tests/BurntToast.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,6 @@ Describe 'New-BTInput' {
}
}




Describe 'New-BTAction' {
Context 'running without arguments' {
Start-Transcript tmp.log
Expand Down Expand Up @@ -491,8 +488,26 @@ Describe 'New-BTBinding' {
}
}

Describe 'New-BTVisual' {
$Text1 = New-BTText -Content 'This is a test'
$Binding1 = New-BTBinding -Children $Text1


Context 'accept binding, create visual' {
Start-Transcript tmp.log
try {
New-BTVisual -BindingGeneric $Binding1 -WhatIf
}
finally {
Stop-Transcript
$Log = (Get-Content tmp.log).Where({ $_ -match "What if: " })
Remove-Item tmp.log
}
It 'has consitent WhatIf response' {
$Expected = 'What if: Performing the operation "New-BTVisual" on target "returning: [ToastVisual]:BindingGeneric=1:BaseUri=:Language=".'
$Log -join [System.Environment]::NewLine | should Be $Expected
}
}
}

Describe 'New-BTContent' {
$Text1 = New-BTText -Content 'This is a test'
Expand Down Expand Up @@ -534,6 +549,7 @@ Describe 'New-BTContent' {
}



# Describe 'New-BurntToastNotification' {
# Context 'running without arguments' {
# It 'runs without errors' {
Expand Down

0 comments on commit 9684108

Please sign in to comment.