continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r598174 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa: ./ src/test/java/org/apache/maven/continuum/store/ src/test/java/org/apache/maven/continuum/store/jpa/ src/test/java/org/apache/openjpa/persistence/test/ src/test/res...
Date Mon, 26 Nov 2007 09:04:47 GMT
Author: rinku
Date: Mon Nov 26 01:04:46 2007
New Revision: 598174

URL: http://svn.apache.org/viewvc?rev=598174&view=rev
Log:
o  minor refactoring.

Added:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-table-data.sql
      - copied, changed from r597970, maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/table-project-data.sql
Removed:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/table-project-data.sql
Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml?rev=598174&r1=598173&r2=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml (original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml Mon Nov 26 01:04:46
2007
@@ -26,5 +26,17 @@
       <version>1.8.0.7</version>
       <scope>test</scope>
     </dependency>
+    
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4.7</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-40</version>
+    </dependency>
   </dependencies>  
 </project>

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java?rev=598174&r1=598173&r2=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
Mon Nov 26 01:04:46 2007
@@ -26,6 +26,26 @@
 {
 
     /**
+     * @see org.apache.openjpa.persistence.test.SingleEMTestCase#setUp()
+     */
+    @Override
+    public void setUp()
+    {
+
+        super.setUp();
+    }
+
+    /**
+     * @see org.apache.openjpa.persistence.test.SingleEMTestCase#tearDown()
+     */
+    @Override
+    public void tearDown() throws Exception
+    {
+        // TODO Auto-generated method stub
+        super.tearDown();
+    }
+
+    /**
      * Imports sql from the specified file.
      * 
      * @param sqlResource

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=598174&r1=598173&r2=598174&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
Mon Nov 26 01:04:46 2007
@@ -7,6 +7,7 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.StoreTestCase;
 import org.apache.openjpa.persistence.OpenJPAQuery;
 
@@ -26,7 +27,7 @@
     @Override
     public void setUp()
     {
-        File testData = new File( "src/test/resources/sql/table-project-data.sql" );
+        File testData = new File( "src/test/resources/sql/project-table-data.sql" );
         assertTrue( "Unable to find test data resource: " + testData.getAbsolutePath(), testData.exists()
);
         Properties propMap = new Properties();
         setUp( propMap );
@@ -44,7 +45,7 @@
         return PERSISTENT_UNIT_CONTINUUM_STORE;
     }
 
-    public void testContinuumJPAStoreActions()
+    public void testOpenJPASetup()
     {
         OpenJPAQuery q = em.createQuery( "select p from Project p" );
         String[] sql = q.getDataStoreActions( null );
@@ -52,7 +53,21 @@
         assertTrue( sql[0].startsWith( "SELECT" ) );
         List results = q.getResultList();
         assertNotNull( results );
-        assertEquals( 1, results.size() );
+        assertEquals( 2, results.size() );
+    }
+    
+    public void testCreateProject()
+    {
+        Project project = new Project();
+        project.setArtifactId( "sample-project" );
+        project.setGroupId( "org.sample.group" );
+        project.setName( "Sample Project" );
+        project.setDescription( "A sample project" );
+        project.setScmUseCache( false );
+        project.setScmUrl( "https://localhost/svn/sample-project" );
+        project.setModelEncoding( "UTF-8" );
+        
+        
     }
 
     /**

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=598174&r1=598173&r2=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
Mon Nov 26 01:04:46 2007
@@ -20,20 +20,22 @@
 
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.HashMap;
+
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.Persistence;
 
 import junit.framework.TestCase;
+
 import org.apache.openjpa.kernel.AbstractBrokerFactory;
 import org.apache.openjpa.kernel.Broker;
 import org.apache.openjpa.meta.ClassMetaData;
-import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
 import org.apache.openjpa.persistence.JPAFacadeHelper;
+import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
 
 /**
  * Base test class providing persistence utilities.

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java?rev=598174&r1=598173&r2=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
Mon Nov 26 01:04:46 2007
@@ -18,9 +18,8 @@
  */
 package org.apache.openjpa.persistence.test;
 
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Map;
+import java.util.List;
 
 import org.apache.openjpa.lib.jdbc.AbstractJDBCListener;
 import org.apache.openjpa.lib.jdbc.JDBCEvent;

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java?rev=598174&r1=598173&r2=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java
Mon Nov 26 01:04:46 2007
@@ -20,6 +20,7 @@
 
 import java.util.Collections;
 import java.util.List;
+
 import javax.persistence.EntityTransaction;
 
 import org.apache.openjpa.persistence.OpenJPAEntityManager;

Copied: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-table-data.sql
(from r597970, maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/table-project-data.sql)
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-table-data.sql?p2=maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-table-data.sql&p1=maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/table-project-data.sql&r1=597970&r2=598174&rev=598174&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/table-project-data.sql
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-table-data.sql
Mon Nov 26 01:04:46 2007
@@ -1,4 +1,7 @@
 # Test SQL to populate data here
 
 INSERT INTO PROJECT (ID, DATE_CREATED, DATE_UPDATED, MODEL_ENCODING, ARTIFACT_ID, GROUP_ID,
DESCRIPTION, NAME, FLG_SCM_USE_CACHE)
-  VALUES (100, 2007-11-01, 2007-11-10, 'UTF-8', 'continuum-jpa-model', 'org.apache.maven.continuum',
'Model for Continuum using JPA', 'continuum-jpa-model', false);
\ No newline at end of file
+  VALUES (100, 2007-11-01, 2007-11-10, 'UTF-8', 'continuum-jpa-model', 'org.apache.maven.continuum',
'Model for Continuum using JPA', 'continuum-jpa-model', false);
+
+INSERT INTO PROJECT (ID, DATE_CREATED, DATE_UPDATED, MODEL_ENCODING, ARTIFACT_ID, GROUP_ID,
DESCRIPTION, NAME, FLG_SCM_USE_CACHE)
+  VALUES (101, 2007-11-02, 2007-11-11, 'UTF-8', 'continuum-jdo-model', 'org.apache.maven.continuum',
'Legacy Model for Continuum using JDO', 'continuum-jdo-model', true);
\ No newline at end of file



Mime
View raw message