public ActionResult <Guid> CreateAnticipation([FromBody] IEnumerable <AnticipationRequest> anticipations) { try { return(Ok(_anticipationService.CreateAnticipation( _transactionService.CheckAvailable(anticipations.Select(a => a.nsu))))); } catch (ForbiddenException n) { return(Forbid(n.Message)); } catch (NotFoundException n) { return(NotFound(n.Message)); } }
public void TestCreateAnticipationOk() { Assert.NotNull(_anticipationService.CreateAnticipation(_transactionMock)); }