From 61ba61fcd18225e79be2d477c0e6ca7baf946da3 Mon Sep 17 00:00:00 2001 From: hongwei1 Date: Wed, 22 Feb 2017 16:29:04 +0100 Subject: [PATCH] fixed the create counterpart test --- src/main/scala/code/api/v2_1_0/APIMethods210.scala | 2 +- src/test/scala/code/api/LocalMappedConnectorTestSetup.scala | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/scala/code/api/v2_1_0/APIMethods210.scala b/src/main/scala/code/api/v2_1_0/APIMethods210.scala index 0f921e680..7b90b6df7 100644 --- a/src/main/scala/code/api/v2_1_0/APIMethods210.scala +++ b/src/main/scala/code/api/v2_1_0/APIMethods210.scala @@ -362,7 +362,7 @@ trait APIMethods210 { // Following 7 lines: just transfer the details body, add Bank_Id and Account_Id in the Detail part. toBankId <- Full(BankId(toCounterparty.otherBankId )) toAccountId <- Full(AccountId(toCounterparty.otherAccountId)) - toAccountProvider <- Full(AccountId(toCounterparty.otherAccountProvider)) + toAccountProvider <- Full(toCounterparty.otherAccountProvider) // Use toAccountProvider to determine how we validate the toBank and toAccount. // i.e. Only validate toBankId and toAccountId if the toAccountProvider is OBP // i.e. if toAccountProvider is OBP we can expect the account to exist locally. diff --git a/src/test/scala/code/api/LocalMappedConnectorTestSetup.scala b/src/test/scala/code/api/LocalMappedConnectorTestSetup.scala index d6d5c6b1c..ec00bce8a 100644 --- a/src/test/scala/code/api/LocalMappedConnectorTestSetup.scala +++ b/src/test/scala/code/api/LocalMappedConnectorTestSetup.scala @@ -35,8 +35,9 @@ trait LocalMappedConnectorTestSetup extends TestConnectorSetupWithStandardPermis mOtherBankId(bankId). mOtherAccountId(accountId). mIsBeneficiary(isBeneficiary). - mOtherAccountRoutingScheme("IBAN"). - saveMe + mOtherAccountRoutingScheme("IBAN"). //it is for test, so set it the default value + mOtherAccountProvider("OBP"). //it is for test, so set it the default value + saveMe } // TODO: Should return an option or box so can test if the insert succeeded