public IHttpActionResult AddUser(UserModel user) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } UserModel userModel = pmService.GetUserById(user.UserId); if (userModel != null) { return(BadRequest()); } var result = pmService.AddUser(user); if (result != null) { return(Ok()); } return(BadRequest()); }
public void Mesure_GetUserById_ThroughPutMode() { service.GetUserById(1); perfCounter.Increment(); }
public void When_GetUserById_Then_VerifyResult() { var users = _mockProjectManagerService.GetUserById(1); Assert.NotNull(users); }
public IHttpActionResult GetUserById(int id) { return(Ok(projectManagerService.GetUserById(id))); }