Ejemplo n.º 1
0
 /**
  * @param BankAccount $source
  * @param BankAccount $target
  */
 public function confirm(BankAccount $source, BankAccount $target)
 {
     $this->_idAccountNumberSource = $source->getIdAccount();
     $this->_idAccountNumberTarget = $target->getIdAccount();
     $this->_currencyCode = $this->_exchangeRate->getCurrencyCode();
     $this->_course = $this->_exchangeRate->getCourse();
 }
Ejemplo n.º 2
0
 function it_is_add_account_correct(AccountRepository $accountRepository, BankAccount $oBankAccount, Client $oClient)
 {
     $oBankAccountWrapped = $oBankAccount->getWrappedObject();
     $accountRepository->add($oBankAccountWrapped)->shouldBeCalled();
     $oBankAccount->setIdClient($oClient->getId());
     $this->beConstructedWith($accountRepository->getWrappedObject());
     $this->add($oClient->getWrappedObject(), $oBankAccountWrapped);
 }
 public function add(AddBankAccountCommand $accountCommand)
 {
     $aData = $accountCommand->getPayload();
     $client = $this->_clientRepo->byId($aData['id_client']);
     if (is_null($client) || empty($client)) {
         throw new ClientNotFoundException();
     }
     $bankAccount = new BankAccount(new NumberAccount($aData['number']), new Currency($aData['country_code']));
     $bankAccount->setIdClient($client->getId());
     $this->_accountRepo->add($bankAccount);
 }
 function it_is_confirm_correct_exchange(ExchangeRate $exchangeRate, BankAccount $source, BankAccount $desctionatio)
 {
     $this->beConstructedWith($exchangeRate->getWrappedObject(), 12);
     //Todo dodac in and out
     $this->confirm($source->getWrappedObject(), $desctionatio->getWrappedObject());
 }
Ejemplo n.º 5
0
 function it_is_add_bank_account(BankAccount $bankAccount)
 {
     $this->addBankAccount($bankAccount->getWrappedObject());
 }