public void singInTestRegistroUserExist() { //Arrange var RegUser = new SingIn();//{ User = "******", Email = "*****@*****.**" }; RegUser.User = "******"; RegUser.Email = "*****@*****.**"; //Act var resultado = RegUser.singIn(); //Assert Assert.IsFalse(resultado); }
public void singInTestRegistroUserNoExist() { //Arrange var RegUser = new SingIn();//{ User = "******", Email = "*****@*****.**" }; RegUser.Name = "Raúl"; RegUser.LastName = "González"; RegUser.User = "******"; RegUser.Email = "*****@*****.**"; RegUser.Password = "******"; //Act var resultado = RegUser.singIn(); //Assert Assert.IsTrue(resultado); }
public async Task <ActionResult> Create(SingIn model) { if (ModelState.IsValid) { if (model.singIn() == false) { ViewBag.Message = "El usuario o el email ya existen."; return(View("Create")); } else { return(RedirectToAction("Users")); } } return(View("Create")); }
public async Task <ActionResult> SingIn(SingIn datos) { if (ModelState.IsValid) { if (datos.singIn() == false) { ViewBag.Message = "El usuario o Email ya estan registrados."; return(View("SingIn", datos)); } else { return(RedirectToAction("Index", "Home")); } } else { return(View("SingIn")); } }