mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-11-26 07:26:18 +01:00
Improve backup validation (#849)
This commit is contained in:
@@ -11,6 +11,9 @@ Describe 'Convert-RegistryValueKindFromBackup' {
|
||||
It '<Case>' -ForEach @(
|
||||
@{ Case = 'parses registry kinds case-insensitively'; KindName = 'dword'; Expected = [Microsoft.Win32.RegistryValueKind]::DWord; ExpectedError = $null }
|
||||
@{ Case = 'rejects an invalid registry kind'; KindName = 'NotARegistryValueKind'; Expected = $null; ExpectedError = 'Unsupported registry value kind in backup: NotARegistryValueKind' }
|
||||
@{ Case = 'rejects an undefined numeric kind'; KindName = '99'; Expected = $null; ExpectedError = 'Unsupported registry value kind in backup: 99' }
|
||||
@{ Case = 'rejects Unknown'; KindName = 'Unknown'; Expected = $null; ExpectedError = 'Unsupported registry value kind in backup: Unknown' }
|
||||
@{ Case = 'rejects None'; KindName = 'None'; Expected = $null; ExpectedError = 'Unsupported registry value kind in backup: None' }
|
||||
) {
|
||||
if ($ExpectedError) {
|
||||
{ Convert-RegistryValueKindFromBackup -KindName $KindName } | Should -Throw $ExpectedError
|
||||
|
||||
Reference in New Issue
Block a user