Changeset 5238 for openmrs-modules/addresshierarchy/test/org/openmrs/module/addresshierarchy/AddressHierarchyTest.java
- Timestamp:
- 08/11/08 16:11:10 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/addresshierarchy
- Property svn:ignore set to
dist
build
- Property svn:ignore set to
openmrs-modules/addresshierarchy/test/org/openmrs/module/addresshierarchy/AddressHierarchyTest.java
r4787 r5238 40 40 41 41 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"); 43 43 } 44 /* 44 45 public void testDWR()throws Exception{ 45 46 DWRAddressHierarchyService dwr = new DWRAddressHierarchyService(); … … 54 55 } 55 56 56 } */57 /*57 } 58 58 59 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(); 61 65 for(int i=0;i<y.length;i++) 62 66 System.out.println(y[i]); 63 } */67 } 64 68 /* 65 69 public void testLocationCount() throws Exception{ … … 68 72 }*/ 69 73 70 public void testGetLocations() throws Exception{74 /*public void testGetLocations() throws Exception{ 71 75 String x = ((AddressHierarchyService)Context.getService(AddressHierarchyService.class)).getCompleteLocations(); 72 76 … … 97 101 JSONObject obj = JSONObject.fromObject(par); 98 102 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); 99 127 }*/ 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 } 100 136 101 137 @Override