@Test public void shouldReturnVersionFromOdeProperties1() { new Expectations() { { injectableOdeProperties.getVersion(); result = "5"; } }; assertEquals("{\"version\":\"5\"}", testOdePropertiesController.getVersion().getBody()); }
@CrossOrigin @GetMapping(value = "/version") public ResponseEntity<String> getVersion() { logger.debug("Request for Version info received: {}", this.odeProperties.getVersion()); return ResponseEntity.ok().body(JsonUtils.jsonKeyValue("version", this.odeProperties.getVersion())); }
OdePropertiesController { @CrossOrigin @GetMapping(value = "/version") public ResponseEntity<String> getVersion() { logger.debug("Request for Version info received: {}", this.odeProperties.getVersion()); return ResponseEntity.ok().body(JsonUtils.jsonKeyValue("version", this.odeProperties.getVersion())); } }
OdePropertiesController { @CrossOrigin @GetMapping(value = "/version") public ResponseEntity<String> getVersion() { logger.debug("Request for Version info received: {}", this.odeProperties.getVersion()); return ResponseEntity.ok().body(JsonUtils.jsonKeyValue("version", this.odeProperties.getVersion())); } @Autowired  OdePropertiesController(OdeProperties odeProperties); }
OdePropertiesController { @CrossOrigin @GetMapping(value = "/version") public ResponseEntity<String> getVersion() { logger.debug("Request for Version info received: {}", this.odeProperties.getVersion()); return ResponseEntity.ok().body(JsonUtils.jsonKeyValue("version", this.odeProperties.getVersion())); } @Autowired  OdePropertiesController(OdeProperties odeProperties); @CrossOrigin @GetMapping(value = "/version") ResponseEntity<String> getVersion(); }
OdePropertiesController { @CrossOrigin @GetMapping(value = "/version") public ResponseEntity<String> getVersion() { logger.debug("Request for Version info received: {}", this.odeProperties.getVersion()); return ResponseEntity.ok().body(JsonUtils.jsonKeyValue("version", this.odeProperties.getVersion())); } @Autowired  OdePropertiesController(OdeProperties odeProperties); @CrossOrigin @GetMapping(value = "/version") ResponseEntity<String> getVersion();  }