public void WriteConfigurationTest()
        {
            var config = new DatabaseConfiguration();
            // connection string and table are provided in OnInitialize()
            config.Initialize();
            
            config.MaxDisplayListItems = 12;
            config.DebugMode = DebugModes.DeveloperErrorMessage;
            config.ApplicationName = "Changed";
            config.SendAdminEmailConfirmations = true;

            // encrypted properties
            config.Password = "******";
            config.AppConnectionString = "server=.;database=HRDatabase";

            Assert.IsTrue(config.Write(),"Write Failed: " + config.ErrorMessage);

            // create a new instance and read the values from the database
            var config2 = new DatabaseConfiguration();
            config2.Initialize(); 
            
            Assert.IsNotNull(config2);
            Assert.AreEqual(config.MaxDisplayListItems, config2.MaxDisplayListItems);
            Assert.AreEqual(config.DebugMode, config2.DebugMode);

            // Encrypted values
            Assert.AreEqual(config.Password, config2.Password);
            Assert.AreEqual(config.AppConnectionString, config2.AppConnectionString);

            // reset to default val
            config.MaxDisplayListItems = 15;
            config.Write();
        }
        public void DefaultConstructorInstanceTest()
        {
            // this should create the database table and add default
            // data into it if it doesn't exist - otherwise
            // the values are read
            var config = new DatabaseConfiguration();
            config.Initialize();

            Assert.IsNotNull(config);
            Assert.IsFalse(string.IsNullOrEmpty(config.ApplicationName));                       
        }