mirror of
https://github.com/MichaelGrafnetter/DSInternals
synced 2025-01-10 00:09:39 +00:00
18 lines
568 B
PowerShell
18 lines
568 B
PowerShell
Describe "ConvertFrom-UnicodePassword" {
|
|
Context "When correct input is provided" {
|
|
$input = 'UABhACQAJAB3ADAAcgBkAEEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAUABhAHMAcwB3AG8AcgBkAA=='
|
|
$expected = 'Pa$$w0rd'
|
|
$actual = ConvertFrom-UnicodePassword $input
|
|
|
|
It "should return the correct password" {
|
|
$actual | Should BeExactly $expected
|
|
}
|
|
}
|
|
Context "When the input is malformed" {
|
|
$input = 'abc'
|
|
|
|
It "should throw an exception" {
|
|
{ ConvertFrom-UnicodePassword $input } | Should Throw
|
|
}
|
|
}
|
|
} |