Update to JUnit5 across all modules (#1668)

* Updated saga to JUnit 5

* Update fix for CI job in trampoline module

* Updated update-method module to JUnit 5

* Upgraded to latest JUnit Jupiter
JUnit 4 is not needed when using JUnit-Vintage

* Reverted change to access modifier on Trampoline

* Cleanup to resolve code smells

* Formatting

* Formatting

* Migrating to JUnit5 and updating some Mockito patterns

* Migrating to JUnit5

* Migrating to JUnit5

* Migrating to JUnit 5

* Formatting cleanup

* Added missing scope for junit

* Fixed tests that were not running previously.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
This commit is contained in:
CF
2021-03-06 04:12:46 -05:00
committed by GitHub
parent e9d0b3e98c
commit c150871a94
53 changed files with 333 additions and 412 deletions
@@ -23,30 +23,31 @@
package com;
import static org.junit.jupiter.api.Assertions.assertEquals;
import com.iluwatar.leaderfollowers.Task;
import com.iluwatar.leaderfollowers.TaskSet;
import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
* Tests for TaskSet
*/
public class TaskSetTest {
class TaskSetTest {
@Test
public void testAddTask() throws InterruptedException {
void testAddTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(10));
Assert.assertTrue(taskSet.getSize() == 1);
assertEquals(1, taskSet.getSize());
}
@Test
public void testGetTask() throws InterruptedException {
void testGetTask() throws InterruptedException {
var taskSet = new TaskSet();
taskSet.addTask(new Task(100));
Task task = taskSet.getTask();
Assert.assertTrue(task.getTime() == 100);
Assert.assertTrue(taskSet.getSize() == 0);
assertEquals(100, task.getTime());
assertEquals(0, taskSet.getSize());
}
}