Refund() public method

Refunds a transaction
public Refund ( int refund = null ) : void
refund int If present, the amount to refund. Otherwise it is a full refund.
return void
        public void ListRefundedTransactions()
        {
            for (int x = 0; x < 2; x++)
            {
                String a = Factories.GetMockAccountName();
                Account acct = new Account(a, "New Txn", "User",
                    "4111111111111111", DateTime.Now.Month, DateTime.Now.Year + 1);
                acct.Create();

                Transaction t = new Transaction(acct.AccountCode, 3000 + x, "USD");

                t.Create();

                t.Refund(1500);

            }

            TransactionList list = TransactionList.GetTransactions(TransactionList.TransactionState.successful);

            Assert.IsTrue(list.Count > 0);
        }
        public void RefundTransactionPartial()
        {
            String a = Factories.GetMockAccountName();
            Account acct = new Account(a, "New Txn", "User",
                "4111111111111111", DateTime.Now.Month, DateTime.Now.Year + 1);

            Transaction t = new Transaction(acct, 5000, "USD");

            t.Create();

            t.Refund(2500);

            Assert.Fail("Need to check for a new refund transaction.");
        }
        public void RefundTransactionFull()
        {
            String a = Factories.GetMockAccountName();
            Account acct = new Account(a, "New Txn", "User",
                "4111111111111111", DateTime.Now.Month, DateTime.Now.Year + 1);

            Transaction t = new Transaction(acct, 5000, "USD");

            t.Create();

            t.Refund();

            Assert.AreEqual(t.Status, Transaction.TransactionState.voided);
        }