← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11626: fix test fail

 

------------------------------------------------------------
revno: 11626
committer: Long <Long@Long-Laptop>
branch nick: dhis2
timestamp: Mon 2013-08-12 11:24:50 +0700
message:
  fix test fail
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.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/sms/outbound/DefaultOutboundSmsTransportService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java	2013-08-12 03:29:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java	2013-08-12 04:24:50 +0000
@@ -189,7 +189,11 @@
 
         message = "success";
 
-        if ( config.getGateways() == null || config.getGateways().isEmpty() )
+        if ( config == null )
+        {
+            message = "unable_to_load_configure";
+        }
+        else if ( config.getGateways() == null || config.getGateways().isEmpty() )
         {
             message = "unable_load_configuration_cause_of_there_is_no_gateway";
         }
@@ -546,7 +550,5 @@
     {
         this.smsPublisher = smsPublisher;
     }
-    
-    
 
 }