public void Testlogin() //need to return true only to values "test1" { Assert.IsTrue(forum.login("test1", "test1")); Assert.IsFalse(forum.login("ddd", "test1")); Assert.IsFalse(forum.login("test1", "dsfdsf")); }
private void button6_Click(object sender, EventArgs e) { userPreNew userPresentat = new userPreNew(myConnection, CurrentState); string userName = this.userName.Text; string passWord = this.passWord.Text; if (myConnection.login(userName, passWord)) { MessageBox.Show("" + userName + "welcome to the forum"); userPresentat.Show(); } else { MessageBox.Show("not exist username or password"); } }