forked from oo-bootcamp/oo-principle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (46 loc) · 1.66 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
group 'cc.oobootcamp'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def JUNIT5_API_VERSION = '5.3.0'
def JUNIT5_PLATFORM_VERSION = '1.3.0'
ext.libs = [
junit4: [
'junit:junit:4.12',
'org.mockito:mockito-core:2.19.0'
],
junit5: [
"org.junit.jupiter:junit-jupiter-api:${JUNIT5_API_VERSION}",
"org.junit.jupiter:junit-jupiter-engine:${JUNIT5_API_VERSION}",
"org.junit.vintage:junit-vintage-engine:${JUNIT5_API_VERSION}",
"org.junit.jupiter:junit-jupiter-params:${JUNIT5_API_VERSION}",
"org.junit.platform:junit-platform-launcher:${JUNIT5_PLATFORM_VERSION}",
"org.junit.platform:junit-platform-runner:${JUNIT5_PLATFORM_VERSION}",
'org.mockito:mockito-junit-jupiter:2.17.0'
]
]
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
afterSuite { desc, result ->
if (!desc.parent) {
def output = " Result: ${result.resultType} " +
"(${result.testCount} Tests, " +
"${result.successfulTestCount} Successes, " +
"${result.failedTestCount} Failures, " +
"${result.skippedTestCount} Skipped) "
println('\n' + ('-' * output.length()) + '\n' + output + '\n' + ('-' * output.length()))
}
}
}
}
dependencies {
testCompile libs.junit5
testCompile 'org.assertj:assertj-core:3.10.0'
testCompile 'org.hamcrest:hamcrest-core:2.1'
}