← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16270: Minor fix.

 

------------------------------------------------------------
revno: 16270
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-07-29 19:05:34 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.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/option/OptionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java	2014-07-29 07:52:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java	2014-07-29 12:05:34 +0000
@@ -52,16 +52,21 @@
     private OptionSet optionSetB = new OptionSet( "OptionSetB" );
 
     private OptionSet optionSetC = new OptionSet( "OptionSetC" );
-
+  
+    private Option option1;
+    private Option option2;
+    private Option option3;
+    private Option option4;
+    
     @Override
     public void setUpTest()
     {
         optionService = (OptionService) getBean( OptionService.ID );
 
-        Option option1 = new Option("OptA1","OptA1");
-        Option option2 = new Option("OptA2","OptA2");
-        Option option3 = new Option("OptB1","OptB1");
-        Option option4 = new Option("OptB2","OptB2");
+        option1 = new Option("OptA1","OptA1");
+        option2 = new Option("OptA2","OptA2");
+        option3 = new Option("OptB1","OptB1");
+        option4 = new Option("OptB2","OptB2");
         
         options.add( option1);
         options.add( option2);
@@ -97,10 +102,10 @@
         assertEquals( 4, optionSetB.getOptions().size() );
         assertEquals( 0, optionSetC.getOptions().size() );
 
-        assertTrue( optionSetA.getOptions().contains( "OptA1" ) );
-        assertTrue( optionSetA.getOptions().contains( "OptA2" ) );
-        assertTrue( optionSetA.getOptions().contains( "OptB1" ) );
-        assertTrue( optionSetA.getOptions().contains( "OptB2" ) );
+        assertTrue( optionSetA.getOptions().contains( option1 ) );
+        assertTrue( optionSetA.getOptions().contains( option2 ) );
+        assertTrue( optionSetA.getOptions().contains( option3 ) );
+        assertTrue( optionSetA.getOptions().contains( option4 ) );
     }
 
     @Test