public void ReturnAllAnticipations() { BulkAnticipation anticipation = CreateBulkAnticipation(); Recipient recipient = CreateRecipient(); recipient.Save(); Transaction transaction = CreateCreditCardSplitRuleTransaction(recipient); transaction.Save(); recipient.CreateAnticipation(anticipation); Assert.IsTrue(recipient.Anticipations.FindAll(new BulkAnticipation()).Count() == 1); }
public void CreateAnticipation() { BulkAnticipation anticipation = CreateBulkAnticipation(); Recipient recipient = CreateRecipient(); recipient.Save(); Transaction transaction = CreateCreditCardSplitRuleTransaction(recipient); transaction.Save(); recipient.CreateAnticipation(anticipation); Assert.IsTrue(anticipation.Status == Enumeration.BulkAnticipationStatus.Pending); }
public void DeleteAnticipation() { BulkAnticipation anticipation = CreateBulkAnticipationWithBuildTrue(); Recipient recipient = CreateRecipient(); recipient.Save(); Transaction transaction = CreateCreditCardSplitRuleTransaction(recipient); transaction.Save(); recipient.CreateAnticipation(anticipation); Assert.IsTrue(anticipation.Status == PagarMe.Enumeration.BulkAnticipationStatus.Building); recipient.DeleteAnticipation(anticipation); Assert.IsNull(anticipation.Id); }