@Test public void shouldGetPageSize() throws Exception { when(service.getPropertyValue(StaticReferenceDataController.LINE_ITEMS_PER_PAGE)).thenReturn("2"); ResponseEntity<OpenLmisResponse> response = staticReferenceDataController.getPageSize(); OpenLmisResponse openLmisResponse = response.getBody(); assertThat(response.getStatusCode(), is(HttpStatus.OK)); assertThat((String) openLmisResponse.getData().get("pageSize"), is("2")); }
@RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) public ResponseEntity<OpenLmisResponse> getPageSize() { OpenLmisResponse response = new OpenLmisResponse(PAGE_SIZE, service.getPropertyValue(LINE_ITEMS_PER_PAGE)); return new ResponseEntity(response, OK); }
StaticReferenceDataController extends BaseController { @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) public ResponseEntity<OpenLmisResponse> getPageSize() { OpenLmisResponse response = new OpenLmisResponse(PAGE_SIZE, service.getPropertyValue(LINE_ITEMS_PER_PAGE)); return new ResponseEntity(response, OK); } }
StaticReferenceDataController extends BaseController { @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) public ResponseEntity<OpenLmisResponse> getPageSize() { OpenLmisResponse response = new OpenLmisResponse(PAGE_SIZE, service.getPropertyValue(LINE_ITEMS_PER_PAGE)); return new ResponseEntity(response, OK); }  }
StaticReferenceDataController extends BaseController { @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) public ResponseEntity<OpenLmisResponse> getPageSize() { OpenLmisResponse response = new OpenLmisResponse(PAGE_SIZE, service.getPropertyValue(LINE_ITEMS_PER_PAGE)); return new ResponseEntity(response, OK); }  @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) ResponseEntity<OpenLmisResponse> getPageSize(); @RequestMapping(value = "/reference-data/toggle/{key}", method = RequestMethod.GET) ResponseEntity<OpenLmisResponse> getToggle(@PathVariable(value = "key") String key); }
StaticReferenceDataController extends BaseController { @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) public ResponseEntity<OpenLmisResponse> getPageSize() { OpenLmisResponse response = new OpenLmisResponse(PAGE_SIZE, service.getPropertyValue(LINE_ITEMS_PER_PAGE)); return new ResponseEntity(response, OK); }  @RequestMapping(value = "/reference-data/pageSize", method = RequestMethod.GET) ResponseEntity<OpenLmisResponse> getPageSize(); @RequestMapping(value = "/reference-data/toggle/{key}", method = RequestMethod.GET) ResponseEntity<OpenLmisResponse> getToggle(@PathVariable(value = "key") String key); static final String PAGE_SIZE; static final String LINE_ITEMS_PER_PAGE; static final String KEY_TOGGLE_PREFIX; static final String KEY; }