public void Edit(int userId, [FromBody] Frapid.Account.Entities.User user) { if (user == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { this.UserRepository.Update(user, userId); } catch (UnauthorizedException) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden)); } catch (DataAccessException ex) { throw new HttpResponseException(new HttpResponseMessage { Content = new StringContent(ex.Message), StatusCode = HttpStatusCode.InternalServerError }); } #if !DEBUG catch { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } #endif }
public void Last() { Frapid.Account.Entities.User user = Fixture().GetLast(); Assert.NotNull(user); }
public void Previous() { Frapid.Account.Entities.User user = Fixture().GetPrevious(0); Assert.NotNull(user); }