public void exitsName() { // Use the Assert class to test conditions. list1.AddRange(a); Assert.AreEqual(true, Reigster.exist("nihao", list1)); Assert.AreEqual(true, Reigster.exist("as", list1)); Assert.AreEqual(false, Reigster.exist("asd", list1)); Assert.AreEqual(false, Reigster.exist("123", list1)); }
public void click1() { { if (check(Reigster.getname(), Reigster.getPW(), datalist)) { SceneManager.LoadScene("Chat"); } else { InputField username = GameObject.Find("username").GetComponent <InputField>(); username.text = "password wrong."; } } }
// Use this for initialization void Start() { Reigster.readData(datalist); login.onClick.AddListener(click1); gotoRegister.onClick.AddListener(click2); }
public void register() { Assert.AreEqual(true, Reigster.input(0, "nihao", "123")); // Use the Assert class to test conditions. }