示例#1
0
        public void Edit(int profileId, [FromBody] Frapid.Account.Entities.ConfigurationProfile configurationProfile)
        {
            if (configurationProfile == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.ConfigurationProfileRepository.Update(configurationProfile, profileId);
            }
            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
        }
示例#2
0
 public void Last()
 {
     Frapid.Account.Entities.ConfigurationProfile configurationProfile = Fixture().GetLast();
     Assert.NotNull(configurationProfile);
 }
示例#3
0
 public void Previous()
 {
     Frapid.Account.Entities.ConfigurationProfile configurationProfile = Fixture().GetPrevious(0);
     Assert.NotNull(configurationProfile);
 }