continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r600082 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store: ApplicationContextAwareStoreTestCase.java jpa/JpaProjectGroupStoreTest.java jpa/JpaProjectStoreTest.java
Date Sat, 01 Dec 2007 11:05:02 GMT
Author: rinku
Date: Sat Dec  1 03:05:00 2007
New Revision: 600082

URL: http://svn.apache.org/viewvc?rev=600082&view=rev
Log:
o  updates to unit tests (w-i-p)

Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java?rev=600082&r1=600081&r2=600082&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
Sat Dec  1 03:05:00 2007
@@ -14,6 +14,7 @@
 import java.util.List;
 
 import org.apache.maven.continuum.model.CommonPersistableEntity;
+import org.apache.maven.continuum.store.api.Query;
 import org.apache.maven.continuum.store.api.Store;
 import org.apache.openjpa.persistence.test.SingleEMTestCase;
 import org.springframework.beans.BeansException;
@@ -164,10 +165,10 @@
      * @return
      */
     @SuppressWarnings( "unchecked" )
-    protected <T extends CommonPersistableEntity> Store<T> getStore( String storeBeanReference
)
+    protected <T extends CommonPersistableEntity, Q extends Query<T>> Store<T,
Q> getStore( String storeBeanReference )
     {
         Object store = this.applicationContext.getBean( storeBeanReference );
-        return (Store<T>) store;
+        return (Store<T, Q>) store;
     }
 
     /**

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java?rev=600082&r1=600081&r2=600082&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
Sat Dec  1 03:05:00 2007
@@ -7,9 +7,11 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.store.ApplicationContextAwareStoreTestCase;
+import org.apache.maven.continuum.store.api.ProjectGroupQuery;
+import org.apache.maven.continuum.store.api.Query;
+import org.apache.maven.continuum.store.api.QueryFactory;
 import org.apache.maven.continuum.store.api.Store;
 import org.apache.maven.continuum.store.api.StoreException;
 import org.apache.openjpa.persistence.OpenJPAQuery;
@@ -77,6 +79,14 @@
         Assert.assertEquals( 0, group.getProjects().size() );
     }
 
+    @Test
+    public void testExecuteProjectGroupQuery() throws Exception
+    {
+        Query<ProjectGroup> qry = QueryFactory.createQuery( ProjectGroupQuery.class
);
+        Assert.assertNotNull( qry );
+        // TODO: Implement!
+    }
+
     @Override
     @After
     public void tearDown() throws Exception
@@ -89,9 +99,9 @@
      * 
      * @return
      */
-    private Store<ProjectGroup> getProjectGroupStore()
+    private Store<ProjectGroup, ProjectGroupQuery> getProjectGroupStore()
     {
-        Store<ProjectGroup> store = getStore( BEAN_REF__PROJECT_GROUP_STORE );
+        Store<ProjectGroup, ProjectGroupQuery> store = getStore( BEAN_REF__PROJECT_GROUP_STORE
);
         return store;
     }
 

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java?rev=600082&r1=600081&r2=600082&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
Sat Dec  1 03:05:00 2007
@@ -9,6 +9,7 @@
 
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ApplicationContextAwareStoreTestCase;
+import org.apache.maven.continuum.store.api.ProjectQuery;
 import org.apache.maven.continuum.store.api.Store;
 import org.apache.maven.continuum.store.api.StoreException;
 import org.apache.openjpa.persistence.OpenJPAQuery;
@@ -36,7 +37,7 @@
     private static final String BEAN_REF__PROJECT_STORE = "projectStore";
 
     @Override
-    @Before    
+    @Before
     public void setUp()
     {
         File testData = new File( "src/test/resources/sql/project-table-data.sql" );
@@ -88,9 +89,9 @@
      * 
      * @return
      */
-    private Store<Project> getProjectStore()
+    private Store<Project, ProjectQuery> getProjectStore()
     {
-        Store<Project> store = getStore( BEAN_REF__PROJECT_STORE );
+        Store<Project, ProjectQuery> store = getStore( BEAN_REF__PROJECT_STORE );
         return store;
     }
 



Mime
View raw message