Package org.springframework.data.jpa.showcase.core

Examples of org.springframework.data.jpa.showcase.core.Account


  @Autowired CustomerRepository customerRepository;

  @Test
  public void savesAccount() {

    Account account = accountRepository.save(new Account());
    assertThat(account.getId(), is(notNullValue()));
  }
View Full Code Here


  @Autowired CustomerService customerService;

  @Test
  public void savesAccount() {

    Account account = accountService.save(new Account());
    assertThat(account.getId(), is(notNullValue()));
  }
View Full Code Here

    assertThat(accountRepository.count(), is(1L));
  }

  public void findsExpiredAccounts() {

    Account expired = accountRepository.findOne(1L);
    Account valid = accountRepository.findOne(2L);

    Iterable<Account> findAll = accountRepository.findAll(expiresBefore(new LocalDate(2011, 3, 1)));

    assertThat(findAll, hasItem(expired));
    assertThat(findAll, not(hasItem(valid)));
View Full Code Here

TOP

Related Classes of org.springframework.data.jpa.showcase.core.Account

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.