📍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
@@ -32,13 +32,13 @@ import org.junit.jupiter.api.Test;
/**
* Unit test for Rectangle
*/
public class RectangleTest {
class RectangleTest {
/**
* Test if the values passed through the constructor matches the values fetched from the getters
*/
@Test
public void testConstructor() {
void testConstructor() {
final var rectangle = new Rectangle(1, 2, 3, 4);
assertEquals(1, rectangle.getLeft());
assertEquals(2, rectangle.getTop());
@@ -51,7 +51,7 @@ public class RectangleTest {
* #toString()}
*/
@Test
public void testToString() throws Exception {
void testToString() throws Exception {
final var rectangle = new Rectangle(1, 2, 3, 4);
assertEquals("[1,2,3,4]", rectangle.toString());
}
@@ -60,7 +60,7 @@ public class RectangleTest {
* Test if the {@link Rectangle} class can detect if it intersects with another rectangle.
*/
@Test
public void testIntersection() {
void testIntersection() {
assertTrue(new Rectangle(0, 0, 1, 1).intersectsWith(new Rectangle(0, 0, 1, 1)));
assertTrue(new Rectangle(0, 0, 1, 1).intersectsWith(new Rectangle(-1, -5, 7, 8)));
assertFalse(new Rectangle(0, 0, 1, 1).intersectsWith(new Rectangle(2, 2, 3, 3)));