@Test public void whenNegativeIndexTransaction_isUpdated_shouldReturnZero() { assertThat(transactionDao.updateTransaction(getHttpTransactionWithIndex(-1))).isZero(); }
@Override public int updateTransaction(HttpTransaction httpTransaction) { if (httpTransaction.getId() > 0) return transactionDataStore.updateTransaction(httpTransaction) ? 1 : 0; return 0; }
IMDBTransactionDao implements TransactionDao { @Override public int updateTransaction(HttpTransaction httpTransaction) { if (httpTransaction.getId() > 0) return transactionDataStore.updateTransaction(httpTransaction) ? 1 : 0; return 0; } }
IMDBTransactionDao implements TransactionDao { @Override public int updateTransaction(HttpTransaction httpTransaction) { if (httpTransaction.getId() > 0) return transactionDataStore.updateTransaction(httpTransaction) ? 1 : 0; return 0; } IMDBTransactionDao(TransactionDataStore transactionDataStore, TransactionArchComponentProvider transactionArchComponentProvider, TransactionPredicateProvider transactionPredicateProvider); }
IMDBTransactionDao implements TransactionDao { @Override public int updateTransaction(HttpTransaction httpTransaction) { if (httpTransaction.getId() > 0) return transactionDataStore.updateTransaction(httpTransaction) ? 1 : 0; return 0; } IMDBTransactionDao(TransactionDataStore transactionDataStore, TransactionArchComponentProvider transactionArchComponentProvider, TransactionPredicateProvider transactionPredicateProvider); @Override long insertTransaction(HttpTransaction httpTransaction); @Override int updateTransaction(HttpTransaction httpTransaction); @Override int deleteTransactions(HttpTransaction... httpTransactions); @Override int deleteTransactionsBefore(Date beforeDate); @Override int clearAll(); @Override DataSource.Factory<Integer, HttpTransaction> getAllTransactions(); @Override LiveData<HttpTransaction> getTransactionsWithId(long id); @Override DataSource.Factory<Integer, HttpTransaction> getAllTransactionsWith(String key, SearchType searchType); }
IMDBTransactionDao implements TransactionDao { @Override public int updateTransaction(HttpTransaction httpTransaction) { if (httpTransaction.getId() > 0) return transactionDataStore.updateTransaction(httpTransaction) ? 1 : 0; return 0; } IMDBTransactionDao(TransactionDataStore transactionDataStore, TransactionArchComponentProvider transactionArchComponentProvider, TransactionPredicateProvider transactionPredicateProvider); @Override long insertTransaction(HttpTransaction httpTransaction); @Override int updateTransaction(HttpTransaction httpTransaction); @Override int deleteTransactions(HttpTransaction... httpTransactions); @Override int deleteTransactionsBefore(Date beforeDate); @Override int clearAll(); @Override DataSource.Factory<Integer, HttpTransaction> getAllTransactions(); @Override LiveData<HttpTransaction> getTransactionsWithId(long id); @Override DataSource.Factory<Integer, HttpTransaction> getAllTransactionsWith(String key, SearchType searchType);  }