Esempio n. 1
0
        public void Edit(long queueId, [FromBody] MixERP.Net.Entities.Core.EmailQueue emailQueue)
        {
            if (emailQueue == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.EmailQueueRepository.Update(emailQueue, queueId);
            }
            catch (UnauthorizedException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden));
            }
            catch (MixERPException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage
                {
                    Content    = new StringContent(ex.Message),
                    StatusCode = HttpStatusCode.InternalServerError
                });
            }
            catch
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }
Esempio n. 2
0
 public void Get()
 {
     MixERP.Net.Entities.Core.EmailQueue emailQueue = Fixture().Get(0);
     Assert.NotNull(emailQueue);
 }