Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This was done to handle invalid data like code":403,"message":"OBP-20006: User is missing one or more roles: CanGetEntitlementsForAnyUserAtAnyBank. Anyways, removed try..catch as exception is thrown in method level. Tested it and all 11 TCs are passing. #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/main/resources/application.properties
Expand Up @@ -4,10 +4,9 @@ obp.api.versionedUrl:${obp.api.rootUrl}/obp/v3.1.0
obp.api.directloginUrl=${obp.api.rootUrl}/my/logins/direct
obp.api.directLoginPath=/my/logins/direct

obp.consumerKey=mohge1sdpcssyqwoygsaokfaycayqsrgqcg4o023
obp.consumerKey=pfemfxpuxwm3ew2eq5fcey3liyfapgnv3yvlsrkj

//we are using multiple @FeignClient beans and without bean overriding the app fails to start. \
see https://stackoverflow.com/questions/53787550/jpaauditinghandler-defined-in-null-on-application-startup-using-spring-boot
spring.main.allow-bean-definition-overriding=true


Expand Up @@ -35,7 +35,7 @@ public void fetchTransactionListOk() throws Exception {
TransactionRequest transactionRequest = new TransactionRequest(
new TransactionRequest.DestAccount(bankId, accountIdOne), Money.of(CurrencyUnit.EUR, 5), "some description");

String result = obpApiClient.initiateTransaction(bankId, accounts.get(1).getId(), "SANDBOX_TAN", transactionRequest);
String result = obpApiClient.initiateTransaction(bankId, accounts.get(0).getId(), "SANDBOX_TAN", transactionRequest);

List<Transaction> transactions = obpApiClient.getTransactionsForAccount(bankId, accountIdOne).getTransactions();
Assert.assertTrue(transactions.size() > 0);
Expand Down
19 changes: 11 additions & 8 deletions src/test/java/com/tesobe/obp/user/EntitlementsTest.java
Expand Up @@ -9,13 +9,16 @@

public class EntitlementsTest extends AbstractTestSupport {

@Value("${obp.username}")
private String user;
@Autowired private EntitlementsApiClient entitlementsApiClient;
@Value("${obp.username}")
private String user;
@Autowired
private EntitlementsApiClient entitlementsApiClient;

@Test
public void entitlementsUser() throws Exception {
String entz = entitlementsApiClient.getEntitlements(user);
Assert.assertNotNull(entz);
}
@Test
public void entitlementsUser() throws Exception {

String entz = entitlementsApiClient.getEntitlements(user);

Assert.assertNotNull(entz);
}
}