Migrate to JUnit5
This commit is contained in:
@ -36,8 +36,13 @@
|
||||
<artifactId>guarded-suspension</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -22,13 +22,14 @@
|
||||
*/
|
||||
package com.iluwatar.guarded.suspension;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Test for Guarded Queue
|
||||
*/
|
||||
@ -47,15 +48,14 @@ public class GuardedQueueTest {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Assert.assertEquals(Integer.valueOf(10), value);
|
||||
assertEquals(Integer.valueOf(10), value);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPut() {
|
||||
GuardedQueue g = new GuardedQueue();
|
||||
g.put(12);
|
||||
Assert.assertEquals(Integer.valueOf(12), g.get());
|
||||
|
||||
assertEquals(Integer.valueOf(12), g.get());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user