Exemplo n.º 1
0
        public void MySqlConnectionConnectWrongUser()
        {
            MySqlConnector mySql = new MySqlConnector(Host, Dbname, "Testuser", Passwd);
            mySql.Initialize();

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

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

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

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

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

            Assert.IsTrue(mySql.Connect());
        }
Exemplo n.º 7
0
 public void MysqlConnectionHostDbNameTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host, Dbname);
     Assert.AreEqual(mySql.Host, Host);
     Assert.AreEqual(mySql.DbName, Dbname);
 }
Exemplo n.º 8
0
 public void MySqlConnectionInitMissingPasswdUserTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host, Dbname);
     Assert.IsFalse(mySql.Initialize());
 }
Exemplo n.º 9
0
 public void MysqlConnectionHostTest()
 {
     MySqlConnector mySql = new MySqlConnector(Host);
     Assert.AreEqual(mySql.Host, Host);
 }
Exemplo n.º 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);
 }