← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 16893
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 10:54:50 +0200
message:
  Test fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.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/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java	2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java	2014-10-01 08:54:50 +0000
@@ -385,14 +385,9 @@
         assertNotNull( indicatorService.getIndicator( idA ) );
         assertNotNull( indicatorService.getIndicator( idB ) );
 
-        indicatorService.deleteIndicator( indicatorA );
-
-        assertNull( indicatorService.getIndicator( idA ) );
-        assertNotNull( indicatorService.getIndicator( idB ) );
-
         indicatorService.deleteIndicator( indicatorB );
 
-        assertNull( indicatorService.getIndicator( idA ) );
+        assertNotNull( indicatorService.getIndicator( idA ) );
         assertNull( indicatorService.getIndicator( idB ) );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java	2014-10-01 08:54:50 +0000
@@ -234,22 +234,22 @@
 
         Indicator indicatorA = createIndicator( 'A', type );
         Indicator indicatorB = createIndicator( 'B', type );
+        Indicator indicatorC = createIndicator( 'C', type );
 
         int idA = indicatorStore.save( indicatorA );
         int idB = indicatorStore.save( indicatorB );
+        int idC = indicatorStore.save( indicatorC );
 
         assertNotNull( indicatorStore.get( idA ) );
         assertNotNull( indicatorStore.get( idB ) );
+        assertNotNull( indicatorStore.get( idC ) );
 
         indicatorStore.delete( indicatorA );
+        indicatorStore.delete( indicatorC );
 
         assertNull( indicatorStore.get( idA ) );
         assertNotNull( indicatorStore.get( idB ) );
-
-        indicatorStore.delete( indicatorB );
-
-        assertNull( indicatorStore.get( idA ) );
-        assertNull( indicatorStore.get( idB ) );
+        assertNull( indicatorStore.get( idC ) );
     }
 
     @Test