← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22204: test updates

 

------------------------------------------------------------
revno: 22204
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-03-09 15:02:01 +0700
message:
  test updates
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/dataset_with_sections_gf_update.json


--
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-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java	2016-03-09 07:55:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata2/objectbundle/ObjectBundleServiceTest.java	2016-03-09 08:02:01 +0000
@@ -43,12 +43,10 @@
 import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.Section;
-import org.hisp.dhis.dxf2.metadata2.MetadataExportService;
 import org.hisp.dhis.feedback.ErrorCode;
 import org.hisp.dhis.feedback.ErrorReport;
 import org.hisp.dhis.feedback.ObjectErrorReport;
 import org.hisp.dhis.importexport.ImportStrategy;
-import org.hisp.dhis.node.NodeService;
 import org.hisp.dhis.option.Option;
 import org.hisp.dhis.option.OptionSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -910,21 +908,23 @@
         assertEquals( 1, dataElementOperands.size() );
 
         DataSet dataSet = dataSets.get( 0 );
+        assertEquals( "Updated Data Set", dataSet.getName() );
         assertEquals( 2, dataSet.getSections().size() );
-
-        Section section1 = sections.get( 0 );
-        Section section2 = sections.get( 1 );
-
+        assertNotNull( dataSet.getUser() );
+
+        Section section1 = manager.get( Section.class, "JwcV2ZifEQf" );
+        assertNotNull( section1.getDataSet() );
+        assertNotNull( section1.getCategoryCombo() );
+        assertEquals( 1, section1.getGreyedFields().size() );
         assertEquals( 1, section1.getDataElements().size() );
+        assertNotNull( section1.getDataSet() );
+
+        Section section2 = manager.get( Section.class, "C50M0WxaI7y" );
+        assertNotNull( section2.getDataSet() );
+        assertNotNull( section2.getCategoryCombo() );
+        assertTrue( section2.getGreyedFields().isEmpty() );
         assertEquals( 1, section2.getDataElements().size() );
-
-        assertNotNull( section1.getDataSet() );
         assertNotNull( section2.getDataSet() );
-
-        Section section = manager.get( Section.class, "JwcV2ZifEQf" );
-        assertNotNull( section.getDataSet() );
-        assertNotNull( section.getCategoryCombo() );
-        assertEquals( 1, section.getGreyedFields().size() );
     }
 
     private void defaultSetup()

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/dataset_with_sections_gf_update.json'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/dataset_with_sections_gf_update.json	2016-03-09 07:55:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/resources/dxf2/dataset_with_sections_gf_update.json	2016-03-09 08:02:01 +0000
@@ -2,7 +2,7 @@
   "dataSets": [
     {
       "version": 5,
-      "name": "Data Set",
+      "name": "Updated Data Set",
       "user": {
         "id": "T12jeH7KPzk"
       },