Skip to content

Commit

Permalink
Migrate to JUnit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
kasecato committed May 4, 2018
1 parent 9a3edaa commit 43bcb7c
Show file tree
Hide file tree
Showing 9 changed files with 445 additions and 722 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#jLinqer
[![Circle CI](https://circleci.com/gh/k--kato/jLinqer.svg?style=shield&circle-token=5a717ccbb33b6a206644b5e630807fc9dff1597f)](https://circleci.com/gh/k--kato/jLinqer)
[![Coverage Status](https://coveralls.io/repos/k--kato/jLinqer/badge.svg?branch=master&service=github)](https://coveralls.io/github/k--kato/jLinqer?branch=master)
# jLinqer
[![Circle CI](https://circleci.com/gh/kasecato/jLinqer.svg?style=shield&circle-token=5a717ccbb33b6a206644b5e630807fc9dff1597f)](https://circleci.com/gh/kasecato/jLinqer)
[![Coverage Status](https://coveralls.io/repos/kasecato/jLinqer/badge.svg?branch=master&service=github)](https://coveralls.io/github/kasecato/jLinqer?branch=master)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jlinqer/jlinqer/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jlinqer/jlinqer)
[![License: MIT](http://img.shields.io/badge/license-MIT-orange.svg)](LICENSE)

Expand All @@ -12,15 +12,15 @@
<dependency>
<groupId>com.github.jlinqer</groupId>
<artifactId>jlinqer</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
```

## Usage

The following operations are available.

##LINQ - jLinqer Matrix
## LINQ - jLinqer Matrix

| LINQ(C#) | jLinqer (Java 8) | Stream (Java 8) |
|------|-------|--------|
Expand Down
93 changes: 58 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.jlinqer</groupId>
<artifactId>jlinqer</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<name>jLinqer</name>

<licenses>
Expand All @@ -26,13 +26,20 @@

<developers>
<developer>
<id>k--kato</id>
<name>Keisuke KATO</name>
<email>keisuke.k.kato@gmail.com</email>
<url>https://twitter.com/k_kato</url>
<id>kasecato</id>
<name>Keisuke Kato</name>
<email>kasecato@gmail.com</email>
<url>https://twitter.com/kasecato</url>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<junit.jupiter.version>5.2.0</junit.jupiter.version>
<junit.platform.version>1.2.0</junit.platform.version>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand All @@ -44,20 +51,6 @@
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<directory>${project.basedir}/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
Expand All @@ -82,14 +75,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<version>2.10.4</version>
<configuration>
<author>true</author>
<source>1.8</source>
<source>${java.version}</source>
<show>protected</show>
<encoding>UTF-8</encoding>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<encoding>${project.build.sourceEncoding}</encoding>
<charset>${project.build.sourceEncoding}</charset>
<docencoding>${project.build.sourceEncoding}</docencoding>
</configuration>
<executions>
<execution>
Expand All @@ -103,7 +96,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<version>1.6.4</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -114,7 +107,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
<version>0.8.0</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -127,12 +120,28 @@
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.0.0</version>
<version>4.3.0</version>
<configuration>
<!--<repoToken></repoToken>-->
<sourceEncoding>UTF-8</sourceEncoding>
<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
Expand All @@ -145,10 +154,10 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
Expand All @@ -166,16 +175,16 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -190,4 +199,18 @@
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
8 changes: 4 additions & 4 deletions test/com/github/jlinqer/collections/DictionaryTest.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.github.jlinqer.collections;

import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Created by Keisuke Kato
*/
public class DictionaryTest {
class DictionaryTest {
// -------------------------- OTHER METHODS --------------------------

@Test
public void functions() throws Exception {
void functions() {
// arrange
Dictionary<String, Integer> dic = new Dictionary<>();

Expand Down
12 changes: 6 additions & 6 deletions test/com/github/jlinqer/collections/ListTest.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.github.jlinqer.collections;

import com.github.jlinqer.linq.IEnumerable;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.ListIterator;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Created by Keisuke Kato
*/
public class ListTest {
class ListTest {
// -------------------------- OTHER METHODS --------------------------

@Test
public void constructorIEnumerable() throws Exception {
void constructorIEnumerable() {
// arrange
IEnumerable<String> list = new List<>("ES7", "ES7", "ES2016").where(x -> x.startsWith("ES"));

Expand All @@ -30,7 +30,7 @@ public void constructorIEnumerable() throws Exception {
}

@Test
public void constructorItems() throws Exception {
void constructorItems() {
// act
List<String> actual = new List<>("ES2015", "ES2015");

Expand All @@ -40,7 +40,7 @@ public void constructorItems() throws Exception {
}

@Test
public void functions() throws Exception {
void functions() {
// arrange
List<String> list = new List<>("ES2015", "ES2015", "ES6", "ES2016");

Expand Down
12 changes: 6 additions & 6 deletions test/com/github/jlinqer/collections/SetTest.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.github.jlinqer.collections;

import com.github.jlinqer.linq.IEnumerable;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Created by Keisuke Kato
*/
public class SetTest {
class SetTest {
// -------------------------- OTHER METHODS --------------------------

@Test
public void constructorIEnumerable() throws Exception {
void constructorIEnumerable() {
// arrange
IEnumerable<String> list = new List<>("ES7", "ES7", "ES2016").where(x -> x.startsWith("ES"));

Expand All @@ -26,7 +26,7 @@ public void constructorIEnumerable() throws Exception {
}

@Test
public void constructorItems() throws Exception {
void constructorItems() {
// act
Set<String> actual = new Set<>("ES2015", "ES2015");

Expand All @@ -36,7 +36,7 @@ public void constructorItems() throws Exception {
}

@Test
public void functions() throws Exception {
void functions() {
// arrange
Set<String> set = new Set<>("ES2015", "ES2015", "ES6", "ES2016");

Expand Down

0 comments on commit 43bcb7c

Please sign in to comment.