📍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:
@@ -41,7 +41,7 @@ public class GiantControllerTest {
|
||||
* Verify if the controller passes the health level through to the model and vice versa
|
||||
*/
|
||||
@Test
|
||||
public void testSetHealth() {
|
||||
void testSetHealth() {
|
||||
final var model = mock(GiantModel.class);
|
||||
final var view = mock(GiantView.class);
|
||||
final var controller = new GiantController(model, view);
|
||||
@@ -65,7 +65,7 @@ public class GiantControllerTest {
|
||||
* Verify if the controller passes the fatigue level through to the model and vice versa
|
||||
*/
|
||||
@Test
|
||||
public void testSetFatigue() {
|
||||
void testSetFatigue() {
|
||||
final var model = mock(GiantModel.class);
|
||||
final var view = mock(GiantView.class);
|
||||
final var controller = new GiantController(model, view);
|
||||
@@ -89,7 +89,7 @@ public class GiantControllerTest {
|
||||
* Verify if the controller passes the nourishment level through to the model and vice versa
|
||||
*/
|
||||
@Test
|
||||
public void testSetNourishment() {
|
||||
void testSetNourishment() {
|
||||
final var model = mock(GiantModel.class);
|
||||
final var view = mock(GiantView.class);
|
||||
final var controller = new GiantController(model, view);
|
||||
@@ -110,7 +110,7 @@ public class GiantControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateView() {
|
||||
void testUpdateView() {
|
||||
final var model = mock(GiantModel.class);
|
||||
final var view = mock(GiantView.class);
|
||||
final var controller = new GiantController(model, view);
|
||||
|
@@ -38,7 +38,7 @@ public class GiantModelTest {
|
||||
* Verify if the health value is set properly though the constructor and setter
|
||||
*/
|
||||
@Test
|
||||
public void testSetHealth() {
|
||||
void testSetHealth() {
|
||||
final var model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED);
|
||||
assertEquals(Health.HEALTHY, model.getHealth());
|
||||
var messageFormat = "The giant looks %s, alert and saturated.";
|
||||
@@ -53,7 +53,7 @@ public class GiantModelTest {
|
||||
* Verify if the fatigue level is set properly though the constructor and setter
|
||||
*/
|
||||
@Test
|
||||
public void testSetFatigue() {
|
||||
void testSetFatigue() {
|
||||
final var model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED);
|
||||
assertEquals(Fatigue.ALERT, model.getFatigue());
|
||||
var messageFormat = "The giant looks healthy, %s and saturated.";
|
||||
@@ -68,7 +68,7 @@ public class GiantModelTest {
|
||||
* Verify if the nourishment level is set properly though the constructor and setter
|
||||
*/
|
||||
@Test
|
||||
public void testSetNourishment() {
|
||||
void testSetNourishment() {
|
||||
final var model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED);
|
||||
assertEquals(Nourishment.SATURATED, model.getNourishment());
|
||||
var messageFormat = "The giant looks healthy, alert and %s.";
|
||||
|
@@ -60,7 +60,7 @@ public class GiantViewTest {
|
||||
* standard out stream, nothing more, nothing less.
|
||||
*/
|
||||
@Test
|
||||
public void testDisplayGiant() {
|
||||
void testDisplayGiant() {
|
||||
final var view = new GiantView();
|
||||
|
||||
final var model = mock(GiantModel.class);
|
||||
|
Reference in New Issue
Block a user