dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17657
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7106: Fixed unit test for code based dataValueSet import
------------------------------------------------------------
revno: 7106
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-05-30 12:13:07 +0100
message:
Fixed unit test for code based dataValueSet import
added:
dhis-2/dhis-dxf2/src/test/resources/datavalueset/dataValueSetBcode.xml
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-30 10:52:18 +0000
+++ dhis-2/dhis-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java 2012-05-30 11:13:07 +0000
@@ -174,13 +174,12 @@
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 );
+ ImportSummary summary = dataValueSetService.saveDataValueSet( new ClassPathResource( "datavalueset/dataValueSetBcode.xml" ).getInputStream(), options );
assertImportDataValues( summary );
}
=== added file 'dhis-2/dhis-dxf2/src/test/resources/datavalueset/dataValueSetBcode.xml'
--- dhis-2/dhis-dxf2/src/test/resources/datavalueset/dataValueSetBcode.xml 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-dxf2/src/test/resources/datavalueset/dataValueSetBcode.xml 2012-05-30 11:13:07 +0000
@@ -0,0 +1,14 @@
+<dataValueSet xmlns="http://dhis2.org/schema/dxf/2.0">
+ <dataValue dataElement="DE_A" period="201201" orgUnit="OU_A" value="10001" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_A" period="201201" orgUnit="OU_B" value="10002" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_A" period="201202" orgUnit="OU_A" value="10003" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_A" period="201202" orgUnit="OU_B" value="10004" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_B" period="201201" orgUnit="OU_A" value="10005" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_B" period="201201" orgUnit="OU_B" value="10006" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_B" period="201202" orgUnit="OU_A" value="10007" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_B" period="201202" orgUnit="OU_B" value="10008" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_C" period="201201" orgUnit="OU_A" value="10009" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_C" period="201201" orgUnit="OU_B" value="10010" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_C" period="201202" orgUnit="OU_A" value="10011" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+ <dataValue dataElement="DE_C" period="201202" orgUnit="OU_B" value="10012" storedBy="john" timestamp="2012-01-01" comment="comment" followup="false"/>
+</dataValueSet>