← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7140: Enabled import test

 

------------------------------------------------------------
revno: 7140
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-06-01 16:17:17 +0200
message:
  Enabled import test
modified:
  dhis-2/dhis-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.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-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java'
--- dhis-2/dhis-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java	2012-06-01 12:21:51 +0000
+++ dhis-2/dhis-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java	2012-06-01 14:17:17 +0000
@@ -30,8 +30,10 @@
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertNotNull;
 import static junit.framework.Assert.assertTrue;
-import static org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty.*;
-import static org.hisp.dhis.importexport.ImportStrategy.*;
+import static org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty.CODE;
+import static org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty.UID;
+import static org.hisp.dhis.importexport.ImportStrategy.NEW_AND_UPDATES;
+import static org.hisp.dhis.importexport.ImportStrategy.UPDATES;
 
 import java.io.InputStreamReader;
 import java.util.Collection;
@@ -54,7 +56,6 @@
 import org.hisp.dhis.period.MonthlyPeriodType;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ClassPathResource;
@@ -245,18 +246,15 @@
         assertEquals( 0, dataValues.size() );
     }
 
-    // Testing importing datavalues where period is not pre-existing fails
-    @Ignore
     @Test
     public void testImportDataValuesWithNewPeriod()
         throws Exception
     {
-        ImportSummary summary = dataValueSetService.saveDataValueSet( new ClassPathResource( "datavalueset/dataValueSetC.xml" ).getInputStream() );
+        dataValueSetService.saveDataValueSet( new ClassPathResource( "datavalueset/dataValueSetC.xml" ).getInputStream() );
         
         Collection<DataValue> dataValues = dataValueService.getAllDataValues();
         
         assertNotNull( dataValues );
         assertEquals( 3, dataValues.size() );
     }
-
 }