Shinsuke Sugaya %!s(int64=8) %!d(string=hai) anos
pai
achega
6451d6966d
Modificáronse 2 ficheiros con 109 adicións e 0 borrados
  1. 58 0
      pom.xml
  2. 51 0
      src/test/java/org/codelibs/fess/it/admin/AccessTokenTests.java

+ 58 - 0
pom.xml

@@ -54,6 +54,9 @@
 
 
 		<!-- Testing -->
 		<!-- Testing -->
 		<junit.version>4.12</junit.version>
 		<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>
 		<utflute.version>0.7.3</utflute.version>
 
 
 		<!-- Crawler -->
 		<!-- Crawler -->
@@ -90,6 +93,23 @@
 		<packaging.fess.dictionary.dir>/var/lib/elasticsearch/config</packaging.fess.dictionary.dir>
 		<packaging.fess.dictionary.dir>/var/lib/elasticsearch/config</packaging.fess.dictionary.dir>
 
 
 	</properties>
 	</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>
 	<build>
 		<finalName>fess</finalName>
 		<finalName>fess</finalName>
 		<resources>
 		<resources>
@@ -159,6 +179,32 @@
 					</execution>
 					</execution>
 				</executions>
 				</executions>
 			</plugin>
 			</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>
 			<plugin>
 				<artifactId>maven-javadoc-plugin</artifactId>
 				<artifactId>maven-javadoc-plugin</artifactId>
 				<version>2.10.4</version>
 				<version>2.10.4</version>
@@ -1339,6 +1385,12 @@
 		</dependency>
 		</dependency>
 
 
 		<!-- test -->
 		<!-- test -->
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter-api</artifactId>
+			<version>${junit.jupiter.version}</version>
+			<scope>test</scope>
+		</dependency>
 		<dependency>
 		<dependency>
 			<groupId>junit</groupId>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 			<artifactId>junit</artifactId>
@@ -1351,5 +1403,11 @@
 			<version>${utflute.version}</version>
 			<version>${utflute.version}</version>
 			<scope>test</scope>
 			<scope>test</scope>
 		</dependency>
 		</dependency>
+		<dependency>
+			<groupId>io.rest-assured</groupId>
+			<artifactId>rest-assured</artifactId>
+			<version>3.0.2</version>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 	</dependencies>
 </project>
 </project>

+ 51 - 0
src/test/java/org/codelibs/fess/it/admin/AccessTokenTests.java

@@ -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() {
+    }
+
+}