Revision a9212ceb
Added by Andreas Müller almost 6 years ago
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/agent/AgentDaoImplTest.java | ||
---|---|---|
267 | 267 |
List<AgentBase> personResults = agentDao.list(Person.class, restrictions, (Integer)null, (Integer)null, null, null); |
268 | 268 |
Assert.assertEquals("list() should return 5 Persons entities", 5, personResults.size()); |
269 | 269 |
|
270 |
Restriction<String> givenNameExact = new Restriction<>("givenname", MatchMode.EXACT);
|
|
270 |
Restriction<String> givenNameExact = new Restriction<>("givenName", MatchMode.EXACT);
|
|
271 | 271 |
restrictions.add(givenNameExact); |
272 | 272 |
|
273 | 273 |
personResults = agentDao.list(Person.class, restrictions, (Integer)null, (Integer)null, null, null); |
... | ... | |
289 | 289 |
|
290 | 290 |
Assert.assertEquals("count() should return 5 Persons entities", 5, agentDao.count(Person.class, restrictions)); |
291 | 291 |
|
292 |
Restriction<String> givenNameExact = new Restriction<>("givenname", MatchMode.EXACT);
|
|
292 |
Restriction<String> givenNameExact = new Restriction<>("givenName", MatchMode.EXACT);
|
|
293 | 293 |
restrictions.add(givenNameExact); |
294 | 294 |
|
295 | 295 |
Assert.assertEquals("count() empty value lists should be ignored", 5, agentDao.count(Person.class, restrictions)); |
... | ... | |
297 | 297 |
givenNameExact.addValue("Ben"); |
298 | 298 |
restrictions.clear(); |
299 | 299 |
restrictions.add(givenNameExact); |
300 |
Assert.assertEquals("count() should return 1 Persons entity having the givenname 'Ben'", 1 , agentDao.count(Person.class, restrictions)); |
|
300 |
Assert.assertEquals("count() should return 1 Persons entity having the given name 'Ben'", 1 , agentDao.count(Person.class, restrictions));
|
|
301 | 301 |
} |
302 | 302 |
|
303 | 303 |
@Test |
Also available in: Unified diff
ref #7238 fix givenname camelCase issue in AgentDaoImplTest