dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17655
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7104: Testing dataValueSet import with CODE.
------------------------------------------------------------
revno: 7104
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-05-30 11:52:18 +0100
message:
Testing dataValueSet import with CODE.
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-05-07 14:57:43 +0000
+++ dhis-2/dhis-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java 2012-05-30 10:52:18 +0000
@@ -54,6 +54,7 @@
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;
@@ -120,6 +121,13 @@
dsA.setUid( "pBOMPrpg1QX" );
ouA.setUid( "DiszpKrYNg8" );
ouB.setUid( "BdfsJfj87js" );
+
+ deA.setCode( "DE_A" );
+ deB.setCode( "DE_B" );
+ deC.setCode( "DE_C" );
+ dsA.setCode( "DS_A" );
+ ouA.setCode( "OU_A" );
+ ouB.setCode( "OU_B" );
dataElementService.addDataElement( deA );
dataElementService.addDataElement( deB );
@@ -166,6 +174,17 @@
assertImportDataValues( summary );
}
+ @Ignore
+ @Test
+ public void testImportDataValuesXmlWithCode()
+ throws Exception
+ {
+ ImportOptions options = new ImportOptions( CODE, CODE, false, NEW_AND_UPDATES, false );
+ ImportSummary summary = dataValueSetService.saveDataValueSet( new ClassPathResource( "datavalueset/dataValueSetB.xml" ).getInputStream(), options );
+
+ assertImportDataValues( summary );
+ }
+
@Test
public void testImportDataValuesCsv()
throws Exception