continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r600832 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa/src: main/java/org/apache/maven/continuum/store/jpa/ test/java/org/apache/maven/continuum/store/jpa/ test/resources/META-INF/ test/resources/sql/
Date Tue, 04 Dec 2007 08:25:38 GMT
Author: rinku
Date: Tue Dec  4 00:25:37 2007
New Revision: 600832

URL: http://svn.apache.org/viewvc?rev=600832&view=rev
Log:
o  added Projectnotifier SQL test data. 
o  fixed unit test.

Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStore.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStoreTest.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-notifier-table-data.sql

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStore.java?rev=600832&r1=600831&r2=600832&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStore.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStore.java
Tue Dec  4 00:25:37 2007
@@ -107,6 +107,7 @@
      * 
      * @see org.apache.maven.continuum.store.api.Store#save(java.lang.Object)
      */
+    @Transactional( readOnly = false )
     public ProjectNotifier save( ProjectNotifier entity ) throws StoreException
     {
         if ( null != entity )

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStoreTest.java?rev=600832&r1=600831&r2=600832&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStoreTest.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectNotifierStoreTest.java
Tue Dec  4 00:25:37 2007
@@ -50,7 +50,7 @@
     {
         OpenJPAQuery q = em.createQuery( "select n from ProjectNotifier n" );
         String[] sql = q.getDataStoreActions( null );
-        Assert.assertEquals( 0, sql.length );
+        Assert.assertEquals( 1, sql.length );
         Assert.assertTrue( sql[0].startsWith( "SELECT" ) );
         List results = q.getResultList();
         Assert.assertNotNull( results );

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml?rev=600832&r1=600831&r2=600832&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
Tue Dec  4 00:25:37 2007
@@ -43,7 +43,7 @@
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>

       
       <!-- Enable SQL logging in OpenJPA -->
-      <!-- property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE" /-->
+      <property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE" />
       
       <!-- Change default log level across OpenJPA 
       <property name="openjpa.Log" value="DefaultLevel=TRACE"/>

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml?rev=600832&r1=600831&r2=600832&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
Tue Dec  4 00:25:37 2007
@@ -59,7 +59,7 @@
   </bean>
 
   <bean id="projectNotifierStoreTarget"
-    class="org.apache.maven.continuum.store.jpa.JpaProjectGroupStore">
+    class="org.apache.maven.continuum.store.jpa.JpaProjectNotifierStore">
     <property name="entityManagerFactory" ref="entityManagerFactory" />
   </bean>
 

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-notifier-table-data.sql
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-notifier-table-data.sql?rev=600832&r1=600831&r2=600832&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-notifier-table-data.sql
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-notifier-table-data.sql
Tue Dec  4 00:25:37 2007
@@ -1 +1,5 @@
-# Test data for Project Notifier tests
\ No newline at end of file
+# Test data for Project Notifier tests
+
+INSERT INTO PROJECT_NOTIFIER 
+  (ID, DATE_CREATED, DATE_UPDATED, MODEL_ENCODING, FLG_ENABLED, NOTIFIER_ORIGIN, RECIPIENT_TYPE,
FLG_SEND_ON_ERROR,FLG_SEND_ON_FAILURE, FLG_SEND_ON_SUCCESS, FLG_SEND_ON_WARNING)
+  VALUES (100, 2007-11-01, 2007-11-10, 'UTF-8', 1, 1, 1 , 1, 0, 0, 0 )
\ No newline at end of file



Mime
View raw message