fixed JPA issue when updating existing owners/pets

This commit is contained in:
Mic 2013-05-09 01:09:21 +08:00
parent e308871591
commit 5bf31dbe5a
4 changed files with 19 additions and 4 deletions

View file

@ -89,8 +89,8 @@ public abstract class AbstractClinicServiceTests {
owner.setCity("Wollongong");
owner.setTelephone("4444444444");
this.clinicService.saveOwner(owner);
Assert.assertNotEquals("Owner Id should have been generated", owner.getId().longValue(), 0);
owners = this.clinicService.findOwnerByLastName("Schultz");
assertNotNull("Owner Id should have been generated", owner.getId());
assertEquals("Verifying number of owners after inserting a new one.", found + 1, owners.size());
}