Tests/ConvertTo-Base64.Tests.ps1

1
2
3
4
5
6
7
8
9
10
11
12
. $PSScriptRoot\..\Src\ConvertTo-Base64.ps1

Describe 'ConvertTo-Base64' {
    $encodedString = 'dGVzdCBzdHJpbmc='
    $decodedString = 'test string'

    It 'returns the expected decoded string given a Base64 encoded string' {
        ConvertTo-Base64 -String $decodedString | Should -Be $encodedString
        $decodedString | ConvertTo-Base64 | Should -Be $encodedString
    }
}