📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
@ -23,8 +23,7 @@
|
||||
|
||||
package com.iluwatar.information.microservice;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@ -38,7 +37,7 @@ public class InformationController {
|
||||
*
|
||||
* @return product inventory.
|
||||
*/
|
||||
@RequestMapping(value = "/information", method = RequestMethod.GET)
|
||||
@GetMapping("/information")
|
||||
public String getProductTitle() {
|
||||
return "The Product Title.";
|
||||
}
|
||||
|
@ -23,17 +23,17 @@
|
||||
|
||||
package com.iluwatar.information.microservice;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Test for Information Rest Controller
|
||||
*/
|
||||
public class InformationControllerTest {
|
||||
class InformationControllerTest {
|
||||
|
||||
@Test
|
||||
public void shouldGetProductTitle() {
|
||||
void shouldGetProductTitle() {
|
||||
var infoController = new InformationController();
|
||||
var title = infoController.getProductTitle();
|
||||
assertEquals("The Product Title.", title);
|
||||
|
Reference in New Issue
Block a user