public void Edit(int contactId, [FromBody] Frapid.WebsiteBuilder.Entities.Contact contact) { if (contact == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { this.ContactRepository.Update(contact, contactId); } 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.WebsiteBuilder.Entities.Contact contact = Fixture().GetLast(); Assert.NotNull(contact); }
public void Previous() { Frapid.WebsiteBuilder.Entities.Contact contact = Fixture().GetPrevious(0); Assert.NotNull(contact); }