public void FindTransferTest() { BankAccount bank = PagarMeTestFixture.CreateTestBankAccount(); bank.Save(); Recipient recipient = PagarMeTestFixture.CreateRecipient(bank); recipient.Save(); Transaction transaction = PagarMeTestFixture.CreateBoletoSplitRuleTransaction(recipient); transaction.Save(); transaction.Status = TransactionStatus.Paid; transaction.Save(); Transfer transfer = PagarMeTestFixture.CreateTestTransfer(bank.Id, recipient.Id); transfer.Save(); Transfer transferReturned = PagarMeService.GetDefaultService().Transfers.Find(transfer.Id); Assert.IsTrue(transferReturned.Id.Equals(transfer.Id)); Assert.IsTrue(transferReturned.Amount.Equals(transfer.Amount)); Assert.IsTrue(transferReturned.DateCreated.Equals(transfer.DateCreated)); Assert.IsTrue(transferReturned.Fee.Equals(transfer.Fee)); Assert.IsTrue(transferReturned.Status.Equals(transfer.Status)); Assert.IsTrue(transferReturned.Type.Equals(transfer.Type)); }
public void CreateTransferTest() { BankAccount bank = PagarMeTestFixture.CreateTestBankAccount(); bank.Save(); Recipient recipient = PagarMeTestFixture.CreateRecipient(bank); recipient.Save(); Transaction transaction = PagarMeTestFixture.CreateBoletoSplitRuleTransaction(recipient); transaction.Save(); transaction.Status = TransactionStatus.Paid; transaction.Save(); Transfer transfer = PagarMeTestFixture.CreateTestTransfer(bank.Id, recipient.Id); transfer.Save(); Assert.IsTrue(transfer.Status == TransferStatus.PendingTransfer); }
public void FindAllTransferTest() { BankAccount bank = PagarMeTestFixture.CreateTestBankAccount(); bank.Save(); Recipient recipient = PagarMeTestFixture.CreateRecipient(bank); recipient.Save(); Transaction transaction = PagarMeTestFixture.CreateBoletoSplitRuleTransaction(recipient); transaction.Save(); transaction.Status = TransactionStatus.Paid; transaction.Save(); Transfer transfer = PagarMeTestFixture.CreateTestTransfer(bank.Id, recipient.Id); transfer.Save(); var transfers = PagarMeService.GetDefaultService().Transfers.FindAll(new Transfer()); Assert.IsTrue(transfers.Count() >= 1); }