void BtnLoginClick(object sender, EventArgs e) { string pass = txtPassword.Text; string path = DiskHelper.GetRegistryValue("Path"); if (IdHandler.IsValidUser(pass)) { IdHandler.GetUuid(pass); LoggedIn(); loggedIn = true; _idx = new Index(path); _p2P = new Network(25565, _idx, path); _p2P.Start(); _idx.Load(); IndexEventHandlers(); if (!_idx.Load()) { _idx.BuildIndex(); } _idx.Start(); _idx.MakeIntegrityCheck(); } else { Controls.Add(lblNope); } }
public void WrongPasswordInvalidUser() { IdHandler.CreateUser(Password); bool result = IdHandler.IsValidUser("wrong"); IdHandler.RemoveUser(); Assert.IsFalse(result); }
public void ValidateUser() { IdHandler.CreateUser(Password); bool result = IdHandler.IsValidUser(Password); IdHandler.RemoveUser(); Assert.IsTrue(result); }