Example #1
0
        public void OpenParentKeyTest()
        {
            const string pathToParentKey = @"HKEY_CURRENT_USER\Software";
            const string pathToKey       = pathToParentKey + @"\Microsoft";

            var registryKey = Registryy.OpenRegistryKey(pathToKey).Value;
            var parentKey   = registryKey.OpenParent();

            Assert.AreEqual(pathToParentKey, parentKey.Name);
        }
Example #2
0
        public void GetNameWithoutPathTest()
        {
            const string pathToKey = @"HKEY_CURRENT_USER\Software\Microsoft";


            var registryKey = Registryy.OpenRegistryKey(pathToKey).Value;

            var nameWithoutPath = registryKey.GetNameWithoutPath();

            Assert.AreEqual("Microsoft", nameWithoutPath);
        }