public void UpdateTest()
        {
            DatabaseDriver databaseDriver = new DatabaseDriver(
                Database.DataSource,
                Database.InitialCatalog,
                Database.UserId,
                Database.Pwd,
                Database.PersistSecurityInfo
                );

            databaseDriver.Connect();
            Dictionary <string, object> account = new Dictionary <string, object>()
            {
                { "account_name", "Coordinate35" },
                { "passwd", "13579" }
            };

            databaseDriver.SetUpdate(Database.TableAccount);
            databaseDriver.SetSet(account);
            databaseDriver.SetAndWhere("account_id", 2);
            bool result = databaseDriver.Update();

            Console.WriteLine(databaseDriver.LastQuery);
            Assert.IsTrue(result);
        }
        public void GetTest()
        {
            DatabaseDriver databaseDriver = new DatabaseDriver(
                Database.DataSource,
                Database.InitialCatalog,
                Database.UserId,
                Database.Pwd,
                Database.PersistSecurityInfo
                );

            databaseDriver.Connect();
            databaseDriver.SetSelect("*");
            databaseDriver.SetFrom("account");
            databaseDriver.SetAndWhere("account_id", 1);
            Dictionary <int, Dictionary <string, Object> > result = databaseDriver.Get();

            Console.WriteLine(databaseDriver.LastQuery);
            Dictionary <int, Dictionary <string, Object> > testCase = new Dictionary <int, Dictionary <string, object> >()
            {
                {
                    0,

                    /*
                     * new Dictionary<string, object>() {
                     *  { "account_id", Convert.ChangeType("1", typeof(Object)) },
                     *  { "account_name", Convert.ChangeType("Coordinate35", typeof(Object)) },
                     *  { "passwd", Convert.ChangeType("123456", typeof(Object)) },
                     *  { "register_time", Convert.ChangeType("123456", typeof(Object)) },
                     *  { "available", Convert.ChangeType("True", typeof(Object)) }
                     * }
                     */
                    new Dictionary <string, object>()
                    {
                        { "account_id", (Int16)1 },
                        { "account_name", "Coordinate35" },
                        { "passwd", "1234dsfadfas5asdfa" },
                        { "register_time", 1482891426 },
                        { "privilege", 1 },
                        { "available", true }
                    }
                }
            };

            Assert.AreEqual(result.Count, testCase.Count);
            for (int i = 0; i < testCase.Count; i++)
            {
                Assert.AreEqual(result[i].Count, testCase[i].Count);
                foreach (string key in testCase[i].Keys)
                {
                    Assert.AreEqual(result[i][key], testCase[i][key]);
                }
            }
        }