public ActionResult <string> Insert(string ApiToken, UserModel model) { if (Helper.ValidateApiToken(ApiToken)) { return(JsonConvert.SerializeObject(UserBLO.Insert(model))); } else { return(JsonConvert.SerializeObject("Token inválido")); } }
public void ShouldNotInsertUser(string name, string CPF, string phone, string email, string password) { var model = new UserModel { Name = name, CPF = CPF, Phone = phone, Email = email, Password = password }; var result = UserBLO.Insert(model); Assert.AreEqual((int)ResultCode.Fail, result.Code); }