@Test public void getTransactionWithId_shouldBeForwardToData() { transactionDao.getTransactionWithId(2); verify(transactionDataStore).getTransactionWithId(2); transactionDao.getTransactionWithId(0); verify(transactionDataStore).getTransactionWithId(0); transactionDao.getTransactionWithId(-1); verify(transactionDataStore).getTransactionWithId(-1); }
@VisibleForTesting HttpTransaction getTransactionWithId(long id) { return transactionDataStore.getTransactionWithId(id); }
IMDBTransactionDao implements TransactionDao { @VisibleForTesting HttpTransaction getTransactionWithId(long id) { return transactionDataStore.getTransactionWithId(id); } }
IMDBTransactionDao implements TransactionDao { @VisibleForTesting HttpTransaction getTransactionWithId(long id) { return transactionDataStore.getTransactionWithId(id); } IMDBTransactionDao(TransactionDataStore transactionDataStore, TransactionArchComponentProvider transactionArchComponentProvider, TransactionPredicateProvider transactionPredicateProvider); }
IMDBTransactionDao implements TransactionDao { @VisibleForTesting HttpTransaction getTransactionWithId(long id) { return transactionDataStore.getTransactionWithId(id); } 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 { @VisibleForTesting HttpTransaction getTransactionWithId(long id) { return transactionDataStore.getTransactionWithId(id); } 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);  }