Skip to content

Commit 6e69c12

Browse files
committed
Initial Test Framework for TestNG, AssertJ and Mockito
1 parent 19e09fb commit 6e69c12

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# api-tests
22
Java API 试验田,API test plots for Java。
3+
34
API 不知道如何使用以及有哪些坑,就在这里通过单元测试(Unit Test,UT)试验。

pom.xml

+32-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<groupId>com.api</groupId>
7-
<artifactId>tests</artifactId>
7+
<artifactId>api-tests</artifactId>
88
<version>1.0-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010

@@ -16,11 +16,42 @@
1616
<url>https://github.com/EdwardLee03/api-tests</url>
1717

1818
<properties>
19+
<!-- Test(测试) -->
20+
<testng.version>6.9.10</testng.version>
21+
<assertj.version>2.3.0</assertj.version>
22+
<mockito.version>1.10.19</mockito.version>
23+
1924
<jdk.version>1.7</jdk.version>
2025
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2126
</properties>
2227

2328
<dependencies>
29+
<!-- ============ Test(测试) ============ -->
30+
<!-- TestNG - http://testng.org/doc/index.html -->
31+
<!-- Documentation - http://testng.org/doc/documentation-main.html -->
32+
<dependency>
33+
<groupId>org.testng</groupId>
34+
<artifactId>testng</artifactId>
35+
<version>${testng.version}</version>
36+
<scope>test</scope>
37+
</dependency>
38+
<!-- AssertJ - http://joel-costigliola.github.io/assertj/ -->
39+
<!-- Quick start - http://joel-costigliola.github.io/assertj/assertj-core-quick-start.html -->
40+
<dependency>
41+
<groupId>org.assertj</groupId>
42+
<artifactId>assertj-core</artifactId>
43+
<!-- use 3.3.0 for Java 8 projects -->
44+
<version>${assertj.version}</version>
45+
<scope>test</scope>
46+
</dependency>
47+
<!-- Mockito - http://site.mockito.org/ -->
48+
<!-- Mockito API - http://site.mockito.org/mockito/docs/current/org/mockito/Mockito.html -->
49+
<dependency>
50+
<groupId>org.mockito</groupId>
51+
<artifactId>mockito-core</artifactId>
52+
<version>${mockito.version}</version>
53+
<scope>test</scope>
54+
</dependency>
2455
</dependencies>
2556

2657
<issueManagement>

testng.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
3+
4+
<suite name="api-tests" verbose="1">
5+
<test name="testng">
6+
</test>
7+
</suite>

0 commit comments

Comments
 (0)