@Override public Account findByCreditCard(String creditCardNumber) { Account account = findAccountByCreditCard(creditCardNumber); loadAccountObjectives(account); return account; }
public String getId() { return name(); }
@Before public void setUp() throws Exception { // simulate Spring bean initialization lifecycle // create the bean first repository = new JdbcMerchantRepository(); // deliver its dependencies repository.setDataSource(createDataSource()); // FIXME 1: initialize the bean repository.populateCache(); }
@Before public void setUp() throws Exception { repository = new JdbcMerchantRepository(new JdbcTemplate(createDataSource())); repository.populateCache(); }
@Before public void setUp() throws Exception { // simulate Spring bean initialization lifecycle // create the bean first repository = new JdbcMerchantRepository(); // deliver its dependencies repository.setDataSource(createDataSource()); // FIXME 1: initialize the bean }
@Test public void shouldClearCacheOnShutdown() { tearDown(); catchException(repository, EmptyResultDataAccessException.class).findByNumber("1234567890"); assertThat(caughtException()).isNotNull(); }
@Bean public RepositoryPerformanceMonitor performanceMonitor() { return new RepositoryPerformanceMonitor(); }
@After public void tearDown() { repository.clearCache(); }
@Before public void setUp() throws Exception { repository = new JdbcMerchantRepository(); repository.setDataSource(createDataSource()); repository.populateCache(); }
@Before public void setUp() throws Exception { repository = new JdbcMerchantRepository(new JdbcTemplate(createDataSource())); repository.populateCache(); }
@Test public void shouldClearCacheOnShutdown() { tearDown(); catchException(repository, EmptyResultDataAccessException.class).findByNumber("1234567890"); assertThat(caughtException()).isNotNull(); }
@Bean public RepositoryPerformanceMonitor performanceMonitor() { return new RepositoryPerformanceMonitor(); }
@After public void tearDown() { repository.clearCache(); }
public String getId() { return name(); }
@Before public void setUp() throws Exception { repository = new JdbcMerchantRepository(); repository.setDataSource(createDataSource()); repository.populateCache(); }
@Bean public RepositoryPerformanceMonitor performanceMonitor() { return new RepositoryPerformanceMonitor(); }
@After public void tearDown() { // simulate Spring bean destruction lifecycle // FIXME 2: destroy the bean repository.clearCache(); }
public String getId() { return name(); }
@Bean public RepositoryPerformanceMonitor performanceMonitor() { return new RepositoryPerformanceMonitor(); }
@After public void tearDown() { repository.clearCache(); }