← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16902: Test fix

 

------------------------------------------------------------
revno: 16902
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 12:35:15 +0200
message:
  Test fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.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-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2014-09-08 13:02:43 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2014-10-01 10:35:15 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 import org.hibernate.Criteria;
 import org.hibernate.Query;
 import org.hibernate.criterion.Order;
@@ -42,7 +41,6 @@
 import java.util.Iterator;
 import java.util.List;
 
-
 /**
  * @author Nguyen Hong Duc
  */

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2014-09-23 07:43:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java	2014-10-01 10:35:15 +0000
@@ -138,34 +138,11 @@
         assertNotNull( dataElementService.getDataElement( idC ) );
         assertNotNull( dataElementService.getDataElement( idD ) );
 
-        dataElementA = dataElementService.getDataElement( idA );
-        dataElementB = dataElementService.getDataElement( idB );
-        dataElementC = dataElementService.getDataElement( idC );
-        dataElementD = dataElementService.getDataElement( idD );
-
-        dataElementService.deleteDataElement( dataElementA );
-        assertNull( dataElementService.getDataElement( idA ) );
-        assertNotNull( dataElementService.getDataElement( idB ) );
-        assertNotNull( dataElementService.getDataElement( idC ) );
-        assertNotNull( dataElementService.getDataElement( idD ) );
-
         dataElementService.deleteDataElement( dataElementB );
-        assertNull( dataElementService.getDataElement( idA ) );
+        assertNotNull( dataElementService.getDataElement( idA ) );
         assertNull( dataElementService.getDataElement( idB ) );
         assertNotNull( dataElementService.getDataElement( idC ) );
         assertNotNull( dataElementService.getDataElement( idD ) );
-
-        dataElementService.deleteDataElement( dataElementC );
-        assertNull( dataElementService.getDataElement( idA ) );
-        assertNull( dataElementService.getDataElement( idB ) );
-        assertNull( dataElementService.getDataElement( idC ) );
-        assertNotNull( dataElementService.getDataElement( idD ) );
-
-        dataElementService.deleteDataElement( dataElementD );
-        assertNull( dataElementService.getDataElement( idA ) );
-        assertNull( dataElementService.getDataElement( idB ) );
-        assertNull( dataElementService.getDataElement( idC ) );
-        assertNull( dataElementService.getDataElement( idD ) );
     }
 
     @Test

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java	2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java	2014-10-01 10:35:15 +0000
@@ -168,11 +168,6 @@
 
         assertNull( dataSetService.getDataSet( idA ) );
         assertNotNull( dataSetService.getDataSet( idB ) );
-
-        dataSetService.deleteDataSet( dataSetService.getDataSet( idB ) );
-
-        assertNull( dataSetService.getDataSet( idA ) );
-        assertNull( dataSetService.getDataSet( idB ) );
     }
 
     @Test

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java	2014-09-28 20:14:48 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java	2014-10-01 10:35:15 +0000
@@ -96,10 +96,7 @@
 
         organisationUnitService.deleteOrganisationUnit( organisationUnitService.getOrganisationUnit( id2 ) );
 
-        organisationUnitService.deleteOrganisationUnit( organisationUnitService.getOrganisationUnit( id1 ) );
-
-        // assert delOrganisationUnit
-        assertNull( organisationUnitService.getOrganisationUnit( id1 ) );
+        assertNotNull( organisationUnitService.getOrganisationUnit( id1 ) );
         assertNull( organisationUnitService.getOrganisationUnit( id2 ) );
     }