fixed tests

This commit is contained in:
dartpopikyardo
2016-03-22 15:07:12 +03:00
parent 7b54b9042d
commit 05ebfd7d14

View File

@@ -107,9 +107,11 @@ public class BankingWebIntegrationTest {
new HttpEntity(BasicAuthUtils.basicAuthHeaders("test_user@mail.com")),
new ParameterizedTypeReference<List<AccountTransactionInfo>>() {}).getBody();
AccountTransactionInfo expectedTransactionInfo = new AccountTransactionInfo(moneyTransfer.getMoneyTransferId(), fromAccountId, toAccountId, toCents(amountToTransfer).longValue());
assertTrue(transactionInfoList.contains(expectedTransactionInfo));
assertTrue(transactionInfoList.stream().filter(ti -> ti.getTransactionId().equals(moneyTransfer.getMoneyTransferId()) &&
ti.getFromAccountId().equals(fromAccountId) &&
ti.getToAccountId().equals(toAccountId) &&
ti.getAmount() == toCents(amountToTransfer).longValue()).findFirst().isPresent());
}
@Test