Migrate to JUnit5
This commit is contained in:
@ -36,8 +36,13 @@
|
||||
<artifactId>fluentinterface</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>
|
||||
<dependency>
|
||||
|
@ -22,7 +22,8 @@
|
||||
*/
|
||||
package com.iluwatar.fluentinterface.app;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Application Test Entry
|
||||
*/
|
||||
|
@ -22,13 +22,23 @@
|
||||
*/
|
||||
package com.iluwatar.fluentinterface.fluentiterable;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Spliterator;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 7:00 PM
|
||||
@ -56,7 +66,7 @@ public abstract class FluentIterableTest {
|
||||
|
||||
@Test
|
||||
public void testFirstEmptyCollection() throws Exception {
|
||||
final List<Integer> integers = Collections.<Integer>emptyList();
|
||||
final List<Integer> integers = Collections.emptyList();
|
||||
final Optional<Integer> first = createFluentIterable(integers).first();
|
||||
assertNotNull(first);
|
||||
assertFalse(first.isPresent());
|
||||
|
Reference in New Issue
Block a user