fix #1001 add junit5

This commit is contained in:
Shinsuke Sugaya 2017-04-20 21:58:15 +09:00
parent 28538cb497
commit 6451d6966d
2 changed files with 109 additions and 0 deletions

58
pom.xml
View file

@ -54,6 +54,9 @@
<!-- Testing -->
<junit.version>4.12</junit.version>
<junit.jupiter.version>5.0.0-M4</junit.jupiter.version>
<junit.vintage.version>${junit.version}.0-M4</junit.vintage.version>
<junit.platform.version>1.0.0-M4</junit.platform.version>
<utflute.version>0.7.3</utflute.version>
<!-- Crawler -->
@ -90,6 +93,23 @@
<packaging.fess.dictionary.dir>/var/lib/elasticsearch/config</packaging.fess.dictionary.dir>
</properties>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<test.include.path>**/*Test.java</test.include.path>
</properties>
</profile>
<profile>
<id>integrationTests</id>
<properties>
<test.include.path>**/*Tests.java</test.include.path>
</properties>
</profile>
</profiles>
<build>
<finalName>fess</finalName>
<resources>
@ -159,6 +179,32 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>${test.include.path}</include>
</includes>
</configuration>
<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>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit.vintage.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
@ -1339,6 +1385,12 @@
</dependency>
<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@ -1351,5 +1403,11 @@
<version>${utflute.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,51 @@
/*
* Copyright 2012-2017 CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.it.admin;
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
@Tag("it")
public class AccessTokenTests {
@BeforeAll
static void initAll() {
}
@BeforeEach
void init() {
}
@Test
void curdTest() {
fail("a failing test");
}
@AfterEach
void tearDown() {
}
@AfterAll
static void tearDownAll() {
}
}