Author: navssurtani
Date: 2008-08-11 08:47:54 -0400 (Mon, 11 Aug 2008)
New Revision: 15030
Modified:
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
Log:
ProvidedId Test passes
Modified:
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2008-08-11
10:41:29 UTC (rev 15029)
+++
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2008-08-11
12:47:54 UTC (rev 15030)
@@ -20,7 +20,7 @@
*/
public class ProvidedIdTest extends SearchTestCase {
- JBossCachePerson person1, person2, person3, person4;
+ JBossCachePerson person1, person2;
protected Class[] getMappings() {
return new Class[]{
@@ -30,31 +30,20 @@
public void testProvidedId() throws ParseException {
- final Logger log = LoggerFactory.getLogger(ProvidedIdTest.class);
person1 = new JBossCachePerson();
- person1.setName("Navin Surtani");
- person1.setBlurb("Likes playing WoW");
+ person1.setName("Big Goat");
+ person1.setBlurb("Eats grass");
person2 = new JBossCachePerson();
- person2.setName("Big Goat");
- person2.setBlurb("Eats grass");
+ person2.setName("Mini Goat");
+ person2.setBlurb("Eats cheese");
- person3 = new JBossCachePerson();
- person3.setName("Mini Goat");
- person3.setBlurb("Eats cheese");
- person4 = new JBossCachePerson();
- person4.setName("Smelly Cat");
- person4.setBlurb("Eats fish");
-
-
Session session = openSession();
FullTextSession fullTextSession = Search.getFullTextSession(session);
Transaction transaction = session.beginTransaction();
session.persist(person1);
session.persist(person2);
- session.persist(person3);
- session.persist(person4);
transaction.commit();
session.clear();
@@ -72,8 +61,7 @@
transaction.commit();
session.close();
-
- if(log.isDebugEnabled()) log.debug("result size is " + results.size());
+ assert results.size() == 2;
}
Show replies by date