Index: topia2/src/test/org/codelutin/topia/TopiaContextTest.java diff -u topia2/src/test/org/codelutin/topia/TopiaContextTest.java:1.10 topia2/src/test/org/codelutin/topia/TopiaContextTest.java:1.11 --- topia2/src/test/org/codelutin/topia/TopiaContextTest.java:1.10 Mon Sep 18 15:53:13 2006 +++ topia2/src/test/org/codelutin/topia/TopiaContextTest.java Thu Sep 28 15:46:10 2006 @@ -23,9 +23,9 @@ * * @author poussin * - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ * - * Last update: $Date: 2006/09/18 15:53:13 $ by : $Author: ruchaud $ + * Last update: $Date: 2006/09/28 15:46:10 $ by : $Author: ruchaud $ */ package org.codelutin.topia; @@ -48,8 +48,6 @@ import org.codelutin.topia.event.TopiaVetoableEntityLoadListener; import org.codelutin.topia.framework.TopiaContextImplementor; import org.codelutin.topia.persistence.TopiaDAO; -import org.hibernate.criterion.Projections; -import org.hibernate.criterion.Restrictions; /** * @author poussin @@ -431,30 +429,5 @@ p.setFirstname("Arno"); assertEquals("entityUpdated", state); } - - public void testProjection() throws Exception { - Properties config = getProperties(); - - TopiaContext context = TopiaContextFactory.getContext(config); - - TopiaContextImplementor childContext = (TopiaContextImplementor) context - .beginTransaction(); - TopiaContextImplementor subChildContext = (TopiaContextImplementor) childContext - .beginTransaction(); - - TopiaDAO persons = subChildContext.getDAO(Person.class); - Person p = persons.create("name", "poussin", "firstname", "benj"); - p = persons.create("name", "thimel", "firstname", "arno"); - p = persons.create("name", "thimel", "firstname", "del"); - p = persons.create("name", "pineau", "firstname", "cedric"); - subChildContext.commitTransaction(); - - assertEquals(4, persons.size()); - - assertEquals("thimel", persons.project(Projections.max("name"))); - assertEquals("pineau", persons.project(Projections.min("name"))); - assertEquals(3, persons.projectAll(Projections.groupProperty("name")).size()); - assertEquals(2, persons.queryAll(Projections.groupProperty("name"), Restrictions.ne("name", "poussin")).size()); - } - + } //TopiaContextTest