Skip to content

Commit

Permalink
Added integration test for saving Accounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Nov 7, 2012
1 parent 81269e7 commit 7d7ecb8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.springframework.data.jpa.showcase.after;

import static org.hamcrest.Matchers.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import java.util.List;
Expand All @@ -24,6 +24,13 @@ public class AccountRepositoryIntegrationTest extends AbstractShowcaseTest {
@Autowired
CustomerRepository customerRepository;

@Test
public void savesAccount() {

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

@Test
public void findsCustomersAccounts() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public class AccountServiceIntegrationTest extends AbstractShowcaseTest {
@Autowired
CustomerService customerService;

@Test
public void savesAccount() {

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

@Test
public void testname() throws Exception {

Expand Down

0 comments on commit 7d7ecb8

Please sign in to comment.