📍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:
va1mandva1m authored and GitHub committed 2021-03-13 14:19:21 +02:00
1 parent 0e26a6adb5
commit 5cf2fe009b
681 files changed
+2472 -4966

No files matched your search

@@ -26,18 +26,17 @@ package com;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import com.iluwatar.leaderfollowers.App;
import org.junit.jupiter.api.Test;
/**
*
* Application test
*
*/
class AppTest {
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}
@@ -34,12 +34,12 @@ import org.junit.jupiter.api.Test;
*/
class TaskHandlerTest {
@Test
void testHandleTask() throws InterruptedException {
var taskHandler = new TaskHandler();
var handle = new Task(100);
taskHandler.handleTask(handle);
assertTrue(handle.isFinished());
}
@Test
void testHandleTask() throws InterruptedException {
var taskHandler = new TaskHandler();
var handle = new Task(100);
taskHandler.handleTask(handle);
assertTrue(handle.isFinished());
}
}
@@ -34,20 +34,20 @@ import org.junit.jupiter.api.Test;
*/
class TaskSetTest {
@Test
void testAddTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(10));
assertEquals(1, taskSet.getSize());
}
@Test
void testAddTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(10));
assertEquals(1, taskSet.getSize());
}
@Test
void testGetTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(100));
Task task = taskSet.getTask();
assertEquals(100, task.getTime());
assertEquals(0, taskSet.getSize());
}
@Test
void testGetTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(100));
Task task = taskSet.getTask();
assertEquals(100, task.getTime());
assertEquals(0, taskSet.getSize());
}
}