@Test public void shouldGetAll() throws Exception { controller.getAll(); verify(service).getAll(); }
@RequestMapping(method = GET, value = "list") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response(EQUIPMENT_TYPES, service.getAll()); }
EquipmentTypeController extends BaseController { @RequestMapping(method = GET, value = "list") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response(EQUIPMENT_TYPES, service.getAll()); } }
EquipmentTypeController extends BaseController { @RequestMapping(method = GET, value = "list") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response(EQUIPMENT_TYPES, service.getAll()); }  }
EquipmentTypeController extends BaseController { @RequestMapping(method = GET, value = "list") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response(EQUIPMENT_TYPES, service.getAll()); }  @RequestMapping(method = GET, value = "list") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(method = GET, value = "id") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") ResponseEntity<OpenLmisResponse> getById( @RequestParam("id") Long id); @RequestMapping(method = GET, value = "operational-status") ResponseEntity<OpenLmisResponse> getAllStatuses( ); @RequestMapping(value = "save", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> save(@RequestBody EquipmentType type, HttpServletRequest request); }
EquipmentTypeController extends BaseController { @RequestMapping(method = GET, value = "list") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response(EQUIPMENT_TYPES, service.getAll()); }  @RequestMapping(method = GET, value = "list") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(method = GET, value = "id") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") ResponseEntity<OpenLmisResponse> getById( @RequestParam("id") Long id); @RequestMapping(method = GET, value = "operational-status") ResponseEntity<OpenLmisResponse> getAllStatuses( ); @RequestMapping(value = "save", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> save(@RequestBody EquipmentType type, HttpServletRequest request); static final String EQUIPMENT_TYPE; static final String STATUS; static final String EQUIPMENT_TYPES; }