← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11364: fix for datasetbatchhandler tests

 

------------------------------------------------------------
revno: 11364
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-07-08 17:12:23 +0700
message:
  fix for datasetbatchhandler tests
modified:
  dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandlerTest.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandlerTest.java'
--- dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandlerTest.java	2013-07-08 09:42:17 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc-test/src/test/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandlerTest.java	2013-07-08 10:12:23 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.period.MonthlyPeriodType;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -114,7 +113,6 @@
     }
 
     @Test
-    @Ignore
     public void testInsertObject()
     {
         int idA = batchHandler.insertObject( dataSetA, true );
@@ -127,7 +125,6 @@
     }
 
     @Test
-    @Ignore
     public void testUpdateObject()
     {
         int id = batchHandler.insertObject( dataSetA, true );

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java	2012-12-04 15:37:27 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java	2013-07-08 10:12:23 +0000
@@ -105,6 +105,8 @@
         statementBuilder.setColumn( "fieldcombinationrequired" );
         statementBuilder.setColumn( "validcompleteonly" );
         statementBuilder.setColumn( "skipoffline" );
+        statementBuilder.setColumn( "renderastabs" );
+        statementBuilder.setColumn( "renderhorizontally" );
     }
 
     protected void setValues( DataSet dataSet )
@@ -118,11 +120,13 @@
         statementBuilder.setValue( dataSet.isMobile() );
         statementBuilder.setValue( dataSet.isAllowFuturePeriods() );
         statementBuilder.setValue( dataSet.getDataEntryForm() != null ? dataSet.getDataEntryForm().getId() : null );
-        statementBuilder.setValue( dataSet.getExpiryDays() );    
+        statementBuilder.setValue( dataSet.getExpiryDays() );
         statementBuilder.setValue( dataSet.isNotifyCompletingUser() );
         statementBuilder.setValue( dataSet.isSkipAggregation() );
         statementBuilder.setValue( dataSet.isFieldCombinationRequired() );
         statementBuilder.setValue( dataSet.isValidCompleteOnly() );
         statementBuilder.setValue( dataSet.isSkipOffline() );
+        statementBuilder.setValue( dataSet.isRenderAsTabs() );
+        statementBuilder.setValue( dataSet.isRenderHorizontally() );
     }
 }