Esempio n. 1
0
        public void Register_Test_Sample()
        {
            string result = UwLogics.Register("Brian", "*****@*****.**", "test");

            UwLogics.Delete(result);
            Assert.AreNotEqual(result, null);
        }
Esempio n. 2
0
        public void Register_Test_NullPassword()
        {
            string result = UwLogics.Register("Brian", "*****@*****.**", null);

            UwLogics.Delete(result);
            Assert.AreEqual(result, null);
        }
Esempio n. 3
0
        public void Register_Test_NullEmail()
        {
            string result = UwLogics.Register("Brian", null, "test");

            UwLogics.Delete(result);
            Assert.AreEqual(result, null);
        }
Esempio n. 4
0
        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));
        }
Esempio n. 6
0
        public void Register_Test_Duplicate()
        {
            string firstid = UwLogics.Register("Brian", "*****@*****.**", "test");
            string result  = UwLogics.Register("Brian", "*****@*****.**", "test");

            UwLogics.Delete(firstid);
            Assert.AreEqual(result, null);
        }
Esempio n. 7
0
        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)));
 }
Esempio n. 9
0
 public string Login([FromBody] LoginModel model)
 {
     return(JsonConvert.SerializeObject(UwLogics.Login(model.loginname, model.password)));
 }