Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs')
-rw-r--r--src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs b/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs
index 217ea87a09..635b8aa59f 100644
--- a/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs
+++ b/src/Microsoft.Win32.Registry/tests/RegistryKey/RegistryKey_DeleteSubKey_str.cs
@@ -7,7 +7,7 @@ using System;
namespace Microsoft.Win32.RegistryTests
{
- public class RegistryKey_DeleteSubKey_str : RegistryTestsBase
+ public class RegistryKey_DeleteSubKey_str : RegistryKeyDeleteSubKeyTestsBase
{
[Fact]
public void NegativeTests()
@@ -52,5 +52,15 @@ namespace Microsoft.Win32.RegistryTests
Assert.Null(TestRegistryKey.OpenSubKey(TestRegistryKeyName));
Assert.Equal(expected: 0, actual: TestRegistryKey.SubKeyCount);
}
+
+ [Theory]
+ [MemberData(nameof(TestRegistrySubKeyNames))]
+ public void DeleteSubKey_KeyExists_KeyDeleted(string expected, string subkeyName) =>
+ Verify_DeleteSubKey_KeyExists_KeyDeleted(expected, () => TestRegistryKey.DeleteSubKey(subkeyName));
+
+ [Theory]
+ [MemberData(nameof(TestRegistrySubKeyNames))]
+ public void DeleteSubKey_KeyDoesNotExists_Throws(string expected, string subkeyName) =>
+ Verify_DeleteSubKey_KeyDoesNotExists_Throws(expected, () => TestRegistryKey.DeleteSubKey(subkeyName));
}
}