📍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:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions

View File

@ -23,23 +23,22 @@
package com.iluwatar.objectmother.test;
import com.iluwatar.objectmother.King;
import com.iluwatar.objectmother.Queen;
import com.iluwatar.objectmother.Royalty;
import com.iluwatar.objectmother.RoyaltyObjectMother;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import com.iluwatar.objectmother.King;
import com.iluwatar.objectmother.Queen;
import com.iluwatar.objectmother.RoyaltyObjectMother;
import org.junit.jupiter.api.Test;
/**
* Test Generation of Royalty Types using the object-mother
*/
public class RoyaltyObjectMotherTest {
@Test
public void unsuccessfulKingFlirt() {
void unsuccessfulKingFlirt() {
var soberUnhappyKing = RoyaltyObjectMother.createSoberUnhappyKing();
var flirtyQueen = RoyaltyObjectMother.createFlirtyQueen();
soberUnhappyKing.flirt(flirtyQueen);
@ -47,7 +46,7 @@ public class RoyaltyObjectMotherTest {
}
@Test
public void queenIsBlockingFlirtCauseDrunkKing() {
void queenIsBlockingFlirtCauseDrunkKing() {
var drunkUnhappyKing = RoyaltyObjectMother.createDrunkKing();
var notFlirtyQueen = RoyaltyObjectMother.createNotFlirtyQueen();
drunkUnhappyKing.flirt(notFlirtyQueen);
@ -55,7 +54,7 @@ public class RoyaltyObjectMotherTest {
}
@Test
public void queenIsBlockingFlirt() {
void queenIsBlockingFlirt() {
var soberHappyKing = RoyaltyObjectMother.createHappyKing();
var notFlirtyQueen = RoyaltyObjectMother.createNotFlirtyQueen();
soberHappyKing.flirt(notFlirtyQueen);
@ -63,7 +62,7 @@ public class RoyaltyObjectMotherTest {
}
@Test
public void successfullKingFlirt() {
void successfullKingFlirt() {
var soberHappyKing = RoyaltyObjectMother.createHappyKing();
var flirtyQueen = RoyaltyObjectMother.createFlirtyQueen();
soberHappyKing.flirt(flirtyQueen);
@ -71,7 +70,7 @@ public class RoyaltyObjectMotherTest {
}
@Test
public void testQueenType() {
void testQueenType() {
var flirtyQueen = RoyaltyObjectMother.createFlirtyQueen();
var notFlirtyQueen = RoyaltyObjectMother.createNotFlirtyQueen();
assertEquals(flirtyQueen.getClass(), Queen.class);
@ -79,7 +78,7 @@ public class RoyaltyObjectMotherTest {
}
@Test
public void testKingType() {
void testKingType() {
var drunkKing = RoyaltyObjectMother.createDrunkKing();
var happyDrunkKing = RoyaltyObjectMother.createHappyDrunkKing();
var happyKing = RoyaltyObjectMother.createHappyKing();