public void Register_Test_Sample() { string result = UwLogics.Register("Brian", "*****@*****.**", "test"); UwLogics.Delete(result); Assert.AreNotEqual(result, null); }
public void Register_Test_NullPassword() { string result = UwLogics.Register("Brian", "*****@*****.**", null); UwLogics.Delete(result); Assert.AreEqual(result, null); }
public void Register_Test_NullEmail() { string result = UwLogics.Register("Brian", null, "test"); UwLogics.Delete(result); Assert.AreEqual(result, null); }
public void Register_Test_NullUserName() { string result = UwLogics.Register(null, "*****@*****.**", "test"); UwLogics.Delete(result); Assert.AreEqual(result, null); }
public string Register([FromBody] RegisterModel model) { string result = UwLogics.Register(model.loginname, model.email, model.password); // Generate Stuff and save into this database as well return(JsonConvert.SerializeObject(result)); }
public void Register_Test_Duplicate() { string firstid = UwLogics.Register("Brian", "*****@*****.**", "test"); string result = UwLogics.Register("Brian", "*****@*****.**", "test"); UwLogics.Delete(firstid); Assert.AreEqual(result, null); }
public ActionResult Login([FromBody] LoginModel model) { var result = JsonConvert.SerializeObject(UwLogics.Login(model.loginname, model.password)); return(Ok(result)); }
public string Registration([FromBody] string username, string email, string password) { return(JsonConvert.SerializeObject(UwLogics.Register(username, email, password))); }
public string Login([FromBody] LoginModel model) { return(JsonConvert.SerializeObject(UwLogics.Login(model.loginname, model.password))); }