public void CreateTest()
        {
            Assert.AreEqual(TestRegistryName, BuffettCodeRegistryAccessor.Create(TestRegistryName).KeyName);

            // validation check
            Assert.ThrowsException <AddinConfigurationException>(() => BuffettCodeRegistryAccessor.Create("dummy"));
        }
        public void ValidValueNameTest()
        {
            // do nothing for supported keys
            BuffettCodeRegistryConfig.SupportedValueNames.ToList().ForEach(name => BuffettCodeRegistryAccessor.ValidValueName(name));

            // validation check
            Assert.ThrowsException <AddinConfigurationException>(() => BuffettCodeRegistryAccessor.ValidValueName("dummy"));
        }
 protected Configuration(string keyName)
 {
     registryAccessor = BuffettCodeRegistryAccessor.Create(keyName);
     // delete old unsupported values
     registryAccessor.DeleteUnSupportedValues();
 }