Migrate to JUnit5

This commit is contained in:
Artur Mogozov
2017-12-31 16:29:48 +09:00
parent a20e54d0a7
commit 6694d742a3
408 changed files with 2656 additions and 2165 deletions

View File

@ -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>

View File

@ -22,7 +22,8 @@
*/
package com.iluwatar.fluentinterface.app;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
* Application Test Entry
*/

View File

@ -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());