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