Searches the registry for keys.
Inheritance: IRegistryKeyValueFinder
コード例 #1
0
        public void Setup()
        {
            _registryWrapper = MockRepository.GenerateMock<IRegistryWrapper>();
            _registryKey = MockRepository.GenerateStub<IRegistryKeyWrapper>();

            _subject = new RegistryKeyValueFinder(_registryWrapper);
            _keysToCheck = new[] { @"SOFTWARE\App1\SubKey\InstallPath1", @"SOFTWARE\App2\InstallPath2" };

            _registryWrapper.Stub(x => x.OpenLocalMachineKey("SOFTWARE")).Return(_registryKey);
        }
コード例 #2
0
        public void Setup()
        {
            _registryWrapper = MockRepository.GenerateMock <IRegistryWrapper>();
            _registryKey     = MockRepository.GenerateStub <IRegistryKeyWrapper>();

            _subject     = new RegistryKeyValueFinder(_registryWrapper);
            _keysToCheck = new[] { @"SOFTWARE\App1\SubKey\InstallPath1", @"SOFTWARE\App2\InstallPath2" };

            _registryWrapper.Stub(x => x.OpenLocalMachineKey("SOFTWARE")).Return(_registryKey);
        }