public void RegistryDeleteSubKeyTreeTest() { var helper = new RegistryWrapper(); helper.WriteSubKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit); helper.WriteSubKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie\Test", RegistryWrapper.RegistryVersion.Only64Bit, new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("Key1", "Value1") }); helper.DeleteSubKeyTree(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit); Assert.IsTrue(helper.ReadKey(@"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit)._64BitValues.Count == 0); }
public void RegistryDeleteSubKeyTest() { var helper = new RegistryWrapper(); helper.WriteSubKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit); helper.DeleteSubKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit); Assert.IsTrue(helper.ReadKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Charlie", RegistryWrapper.RegistryVersion.Only64Bit)._64BitValues.Count == 0); }
public void RegistryWriteSubKeyTest() { var helper = new RegistryWrapper(); helper.WriteSubKey(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Test", RegistryWrapper.RegistryVersion.Only64Bit, new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("Key1", "Value1"), new KeyValuePair <string, object>("Key2 ", "Value2"), new KeyValuePair <string, object>("Key3", "Value3") }); Assert.IsNotNull(helper.ReadKey(@"HKEY_LOCAL_MACHINE\SOFTWARE\Test", RegistryWrapper.RegistryVersion.Only64Bit)._64BitValues, "No value at specified subKey after write attempt."); helper.DeleteSubKeyTree(RegistryWrapper.RegistryKeyRoot.LocalMachine, @"SOFTWARE\Test", RegistryWrapper.RegistryVersion.Only64Bit); }