public void Edit(int genderId, [FromBody] Extems.Academic.Entities.Gender gender) { if (gender == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { this.GenderRepository.Update(gender, genderId); } 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() { Extems.Academic.Entities.Gender gender = Fixture().GetLast(); Assert.NotNull(gender); }
public void Previous() { Extems.Academic.Entities.Gender gender = Fixture().GetPrevious(0); Assert.NotNull(gender); }