diff options
Diffstat (limited to 'src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs')
-rw-r--r-- | src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs b/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs index 4367b72310..292a327108 100644 --- a/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs +++ b/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKeyTree_str.cs @@ -9,7 +9,7 @@ using Xunit; namespace Microsoft.Win32.RegistryTests { - public class RegistryKey_DeleteSubKeyTree_str : RegistryTestsBase + public class RegistryKey_DeleteSubKeyTree_str : RegistryKeyDeleteSubKeyTreeTestsBase { [Fact] public void NegativeTests() @@ -83,5 +83,16 @@ namespace Microsoft.Win32.RegistryTests TestRegistryKey.DeleteSubKeyTree(TestRegistryKeyName); Assert.Null(TestRegistryKey.OpenSubKey(TestRegistryKeyName)); } + + [Theory] + [MemberData(nameof(TestRegistrySubKeyNames))] + public void DeleteSubKeyTree_KeyExists_KeyDeleted(string expected, string subKeyName) => + Verify_DeleteSubKeyTree_KeyExists_KeyDeleted(expected, () => TestRegistryKey.DeleteSubKeyTree(subKeyName)); + + + [Theory] + [MemberData(nameof(TestRegistrySubKeyNames))] + public void Verify_DeleteSubKeyTree_KeyDoesNotExists_Throws(string expected, string subKeyName) => + Verify_DeleteSubKeyTree_KeyDoesNotExists_Throws(expected, () => TestRegistryKey.DeleteSubKeyTree(subKeyName)); } } |