fixed tests

This commit is contained in:
dartpopikyardo
2016-03-22 15:07:48 +03:00
parent 05ebfd7d14
commit 23fba9e462

View File

@@ -133,9 +133,10 @@ public class EndToEndTest {
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