Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/11/08 16:11:10 (5 months ago)
Author:
machosry
Message:

address hierarchy: completed few enhancements suggested in the dev call. still the portlet overriding is not solved yet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/addresshierarchy

    • Property svn:ignore set to
      dist
      build
  • openmrs-modules/addresshierarchy/test/org/openmrs/module/addresshierarchy/AddressHierarchyTest.java

    r4787 r5238  
    4040     
    4141    public void testEditLocation() throws Exception{ 
    42         ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).editLocation(0, "united states", "usa"); 
     42        ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).editLocation(0, "asdalsd", "usa"); 
    4343    } 
     44    /* 
    4445    public void testDWR()throws Exception{ 
    4546        DWRAddressHierarchyService dwr = new DWRAddressHierarchyService(); 
     
    5455        } 
    5556         
    56     }*/ 
    57         /* 
     57    } 
     58         
    5859        public void testGetLocation() throws Exception{ 
    59             y = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getNextComponent(1, "usa", null); 
    60             setComplete(); 
     60                String[] arr = {"0","0","india"}; 
     61            //y = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getNextComponent(arr); 
     62        DWRAddressHierarchyService dwr = new DWRAddressHierarchyService(); 
     63        y = dwr.getNextComponent(arr); 
     64            //setComplete(); 
    6165            for(int i=0;i<y.length;i++) 
    6266            System.out.println(y[i]); 
    63         }*/ 
     67        } 
    6468        /* 
    6569        public void testLocationCount() throws Exception{ 
     
    6872        }*/ 
    6973     
    70     public void testGetLocations() throws Exception{ 
     74    /*public void testGetLocations() throws Exception{ 
    7175        String x = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getCompleteLocations(); 
    7276         
     
    97101        JSONObject obj = JSONObject.fromObject(par); 
    98102        System.out.println(obj); 
     103    } 
     104     
     105    public void testGetLocationType(){ 
     106        String[] arr = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getLocationType(); 
     107        for(int i=0;i<arr.length;i++){ 
     108                System.out.println(arr[i]); 
     109        } 
     110         
     111    } 
     112     
     113    public void testGetLocationTypeTable(){ 
     114        String[] arr = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getLocationTypeTable(); 
     115        for(int i=0;i<arr.length;i=i+4){ 
     116                System.out.println(arr[i]+" "+arr[i+1]+" "+arr[i+2]+" "+arr[i+3]); 
     117        } 
     118         
     119    } 
     120    
     121    public void testUpdateLocationType(){ 
     122         
     123        String[] arr = {"2","0","1","1","4","1","3","0","5","1","6","1","7","0","8","1","9","0","11","0","10","1"}; 
     124        //((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).updateLocationTypeTable(arr); 
     125        DWRAddressHierarchyService dwr = new DWRAddressHierarchyService(); 
     126        dwr.updateLocationTypeTable(arr); 
    99127    }*/ 
     128     
     129    public void testgetAddressHierarchyTypeList(){ 
     130        DWRAddressHierarchyService dwr = new DWRAddressHierarchyService(); 
     131        String[] arr = dwr.getAddressHierarchyTypeList(3); 
     132        for(int i=0;i<arr.length;i++){ 
     133                System.out.println(arr[i]); 
     134        } 
     135    } 
    100136         
    101137        @Override