Pester/ConvertFrom-HtmlEncode.Tests.ps1
Describe "[ConvertFrom-HtmlEncode] Tests" { It "String" { ConvertFrom-HTMLEncode -HTML '&' | Should -Be '&' } It "Longer string" { ConvertFrom-HTMLEncode -HTML ''Hello World'' | Should -Be "'Hello World'" } It "Pipeline" { ''Hello World'' | ConvertFrom-HtmlEncode | Should -Be "'Hello World'" } It "Multiple" { $Result = ConvertFrom-HTMLEncode -HTML 'It's a shame, that's my 2 cents', '<h2>' -IncludeInput $Result.Count | Should -Be 2 $Result[0].PlainText | Should -Be "It's a shame, that's my 2 cents" $Result[1].PlainText | Should -Be '<h2>' } } |