forked from DevFW-CICD/spring-petclinic
Fix Petclinic case-sensitivity problems against MySQL (SPR-7512)
With thanks to Rob Winch for patch submission.
This commit is contained in:
parent
0b9d98ba1c
commit
7cbfaf1726
5 changed files with 25 additions and 18 deletions
|
|
@ -92,7 +92,7 @@ public abstract class AbstractClinicTests extends AbstractTransactionalJUnit4Spr
|
|||
Collection<Vet> vets = this.clinic.getVets();
|
||||
// Use the inherited countRowsInTable() convenience method (from
|
||||
// AbstractTransactionalJUnit4SpringContextTests) to verify the results.
|
||||
assertEquals("JDBC query must show the same number of vets", super.countRowsInTable("VETS"), vets.size());
|
||||
assertEquals("JDBC query must show the same number of vets", super.countRowsInTable("vets"), vets.size());
|
||||
Vet v1 = EntityUtils.getById(vets, Vet.class, 2);
|
||||
assertEquals("Leary", v1.getLastName());
|
||||
assertEquals(1, v1.getNrOfSpecialties());
|
||||
|
|
@ -107,7 +107,7 @@ public abstract class AbstractClinicTests extends AbstractTransactionalJUnit4Spr
|
|||
@Test
|
||||
public void getPetTypes() {
|
||||
Collection<PetType> petTypes = this.clinic.getPetTypes();
|
||||
assertEquals("JDBC query must show the same number of pet types", super.countRowsInTable("TYPES"),
|
||||
assertEquals("JDBC query must show the same number of pet types", super.countRowsInTable("types"),
|
||||
petTypes.size());
|
||||
PetType t1 = EntityUtils.getById(petTypes, PetType.class, 1);
|
||||
assertEquals("cat", t1.getName());
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public abstract class AbstractJpaClinicTests extends AbstractJpaTests {
|
|||
// Use the inherited countRowsInTable() convenience method (from
|
||||
// AbstractTransactionalDataSourceSpringContextTests) to verify the
|
||||
// results.
|
||||
assertEquals("JDBC query must show the same number of vets", super.countRowsInTable("VETS"), vets.size());
|
||||
assertEquals("JDBC query must show the same number of vets", super.countRowsInTable("vets"), vets.size());
|
||||
Vet v1 = EntityUtils.getById(vets, Vet.class, 2);
|
||||
assertEquals("Leary", v1.getLastName());
|
||||
assertEquals(1, v1.getNrOfSpecialties());
|
||||
|
|
@ -97,7 +97,7 @@ public abstract class AbstractJpaClinicTests extends AbstractJpaTests {
|
|||
|
||||
public void testGetPetTypes() {
|
||||
Collection<PetType> petTypes = this.clinic.getPetTypes();
|
||||
assertEquals("JDBC query must show the same number of pet types", super.countRowsInTable("TYPES"),
|
||||
assertEquals("JDBC query must show the same number of pet types", super.countRowsInTable("types"),
|
||||
petTypes.size());
|
||||
PetType t1 = EntityUtils.getById(petTypes, PetType.class, 1);
|
||||
assertEquals("cat", t1.getName());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue