示例#1
0
        public void MySqlConnectionConnectWrongUser()
        {
            MySqlConnector mySql = new MySqlConnector(Host, Dbname, "Testuser", Passwd);
            mySql.Initialize();

            Assert.IsFalse(mySql.Connect());
        }
示例#2
0
        public void MySqlConnectionDisconnectWithoutConnect()
        {
            MySqlConnector mySql = new MySqlConnector(Host, Dbname, Username, Passwd);
            mySql.Initialize();

            Assert.IsTrue(mySql.Disconnect());
        }
示例#3
0
        public void MySqlConnectionConnectWrongHost()
        {
            MySqlConnector mySql = new MySqlConnector("local", Dbname, Username, Passwd);
            mySql.Initialize();

            Assert.IsFalse(mySql.Connect());
        }
示例#4
0
        public void MySqlConnectionConnectWrongPw()
        {
            MySqlConnector mySql = new MySqlConnector(Host, Dbname, Username, "test");
            mySql.Initialize();

            Assert.IsFalse(mySql.Connect());
        }
示例#5
0
        public void MySqlConnectionConnectWrongDbName()
        {
            MySqlConnector mySql = new MySqlConnector(Host, "Foobar", Username, Passwd);
            mySql.Initialize();

            Assert.IsFalse(mySql.Connect());
        }
示例#6
0
        public void MySqlConnectionConnectSuccess()
        {
            MySqlConnector mySql = new MySqlConnector(Host, Dbname, Username, Passwd);
            mySql.Initialize();

            Assert.IsTrue(mySql.Connect());
        }
示例#7
0
 public void MysqlConnectionHostDbNameTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host, Dbname);
     Assert.AreEqual(mySql.Host, Host);
     Assert.AreEqual(mySql.DbName, Dbname);
 }
示例#8
0
 public void MySqlConnectionInitMissingPasswdUserTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host, Dbname);
     Assert.IsFalse(mySql.Initialize());
 }
示例#9
0
 public void MysqlConnectionHostTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host);
     Assert.AreEqual(mySql.Host, Host);
 }
示例#10
0
 public void MysqlConnectionHostDbNameUserPwTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host, Dbname, Username, Passwd);
     Assert.AreEqual(mySql.Host, Host);
     Assert.AreEqual(mySql.DbName, Dbname);
     Assert.AreEqual(mySql.Username, Username);
     Assert.AreEqual(mySql.Password, Passwd);
 }