public void GivenTreeExistsInRegistry_WhenDeletingThatTree_ThenItsNoLongerThere() { Registry.LocalMachine.OpenSubKey("Software", true).CreateSubKey("AzureWebFarm.OctopusDeploy").CreateSubKey("Test").SetValue("test", "Hello World!"); _sut.DeleteLocalMachineTree("Software", "AzureWebFarm.OctopusDeploy"); Registry.LocalMachine.OpenSubKey("Software").GetSubKeyNames().ShouldNotContain("AzureWebFarm.OctopusDeploy"); }