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