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