public void TestConfigHandler_Write()
        {
            var handler = new ConfigLibraryTest.Configuration.ConfigHandler();

            handler.SaveConfig();

            Assert.IsNotEmpty(System.IO.File.ReadAllText(@".\\config.json"));
        }
        public void TestConfigHandler_WriteFileName()
        {
            var handler = new ConfigLibraryTest.Configuration.ConfigHandler();

            //      Addresses = new System.Collections.Generic.Dictionary<string, string> {
            //        { "email1", "*****@*****.**" },
            //        { "email2", "*****@*****.**" },
            //        { "email3", "*****@*****.**" }
            //      };

            var mailbox1 = new ConfigLibraryTest.Entity.MailBox();

            mailbox1.Address = "*****@*****.**";
            mailbox1.Folders = new System.Collections.Generic.List <string> {
                "box1 test1", "box1 test2", "box1 test3"
            };

            var mailbox2 = new ConfigLibraryTest.Entity.MailBox();

            mailbox2.Address = "*****@*****.**";
            mailbox2.Folders = new System.Collections.Generic.List <string> {
                "box2 test1", "box2 test2", "box2 test3"
            };

            var mailbox3 = new ConfigLibraryTest.Entity.MailBox();

            mailbox3.Address = "*****@*****.**";
            mailbox3.Folders = new System.Collections.Generic.List <string> {
                "box3 test1", "box3 test2", "box3 test3"
            };

            Mailboxes = new System.Collections.Generic.List <ConfigLibraryTest.Entity.MailBox> {
                mailbox1, mailbox2, mailbox3
            };

            string path = @".\\test.json";

            handler.AddMailInfo(mailhost, mailuser, mailpass, mailport);
            handler.AddSqlInfo(datahost, datauser, datapass, database, dataport);
            handler.MailBoxes = this.Mailboxes;



            handler.SaveConfig(path);

            Assert.IsNotEmpty(System.IO.File.ReadAllText(@".\\test.json"));
        }