@Test public void whenZeroIndexTransaction_isInserted_returnedIndexShouldNotBeZero() { assertThat(transactionDao.insertTransaction(getHttpTransactionWithZeroIndex())).isNotZero(); }
@Override public long insertTransaction(HttpTransaction httpTransaction) { long newTransactionIndex; if (httpTransaction.getId() == 0) { newTransactionIndex = currentIndex; } else { newTransactionIndex = httpTransaction.getId(); } return addTransactionWithIndex(httpTransaction, newTransactionIndex); }
IMDBTransactionDao implements TransactionDao { @Override public long insertTransaction(HttpTransaction httpTransaction) { long newTransactionIndex; if (httpTransaction.getId() == 0) { newTransactionIndex = currentIndex; } else { newTransactionIndex = httpTransaction.getId(); } return addTransactionWithIndex(httpTransaction, newTransactionIndex); } }
IMDBTransactionDao implements TransactionDao { @Override public long insertTransaction(HttpTransaction httpTransaction) { long newTransactionIndex; if (httpTransaction.getId() == 0) { newTransactionIndex = currentIndex; } else { newTransactionIndex = httpTransaction.getId(); } return addTransactionWithIndex(httpTransaction, newTransactionIndex); } IMDBTransactionDao(TransactionDataStore transactionDataStore, TransactionArchComponentProvider transactionArchComponentProvider, TransactionPredicateProvider transactionPredicateProvider); }
IMDBTransactionDao implements TransactionDao { @Override public long insertTransaction(HttpTransaction httpTransaction) { long newTransactionIndex; if (httpTransaction.getId() == 0) { newTransactionIndex = currentIndex; } else { newTransactionIndex = httpTransaction.getId(); } return addTransactionWithIndex(httpTransaction, newTransactionIndex); } 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 long insertTransaction(HttpTransaction httpTransaction) { long newTransactionIndex; if (httpTransaction.getId() == 0) { newTransactionIndex = currentIndex; } else { newTransactionIndex = httpTransaction.getId(); } return addTransactionWithIndex(httpTransaction, newTransactionIndex); } 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);  }