Updated Payment APIs

- Updated SDK Models to latest Payment APIs
- Updated Unit Tests
This commit is contained in:
Jay Patel
2015-02-26 15:03:59 -06:00
parent 241d80cd17
commit 3e43f93f9b
93 changed files with 6079 additions and 1735 deletions

View File

@@ -0,0 +1,65 @@
<?php
namespace PayPal\Test\Api;
use PayPal\Common\PayPalModel;
use PayPal\Api\RecipientBankingInstruction;
/**
* Class RecipientBankingInstruction
*
* @package PayPal\Test\Api
*/
class RecipientBankingInstructionTest extends \PHPUnit_Framework_TestCase
{
/**
* Gets Json String of Object RecipientBankingInstruction
* @return string
*/
public static function getJson()
{
return '{"bank_name":"TestSample","account_holder_name":"TestSample","account_number":"TestSample","routing_number":"TestSample","international_bank_account_number":"TestSample","bank_identifier_code":"TestSample"}';
}
/**
* Gets Object Instance with Json data filled in
* @return RecipientBankingInstruction
*/
public static function getObject()
{
return new RecipientBankingInstruction(self::getJson());
}
/**
* Tests for Serialization and Deserialization Issues
* @return RecipientBankingInstruction
*/
public function testSerializationDeserialization()
{
$obj = new RecipientBankingInstruction(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getBankName());
$this->assertNotNull($obj->getAccountHolderName());
$this->assertNotNull($obj->getAccountNumber());
$this->assertNotNull($obj->getRoutingNumber());
$this->assertNotNull($obj->getInternationalBankAccountNumber());
$this->assertNotNull($obj->getBankIdentifierCode());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}
/**
* @depends testSerializationDeserialization
* @param RecipientBankingInstruction $obj
*/
public function testGetters($obj)
{
$this->assertEquals($obj->getBankName(), "TestSample");
$this->assertEquals($obj->getAccountHolderName(), "TestSample");
$this->assertEquals($obj->getAccountNumber(), "TestSample");
$this->assertEquals($obj->getRoutingNumber(), "TestSample");
$this->assertEquals($obj->getInternationalBankAccountNumber(), "TestSample");
$this->assertEquals($obj->getBankIdentifierCode(), "TestSample");
}
}