Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
CraftsRecords
TalkAdvisor
TalkAdvisor BackEnd
Commits
f501578e
Commit
f501578e
authored
Feb 14, 2019
by
Julien Topçu
Browse files
Junit5 + Cucumber
parent
005790b9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
228 additions
and
7 deletions
+228
-7
pom.xml
pom.xml
+177
-3
talkadvisor-domain/pom.xml
talkadvisor-domain/pom.xml
+18
-0
talkadvisor-domain/src/test/kotlin/org/craftsrecords/RunCucumberTest.kt
...main/src/test/kotlin/org/craftsrecords/RunCucumberTest.kt
+9
-0
talkadvisor-infra/pom.xml
talkadvisor-infra/pom.xml
+1
-1
talkadvisor-infra/src/main/kotlin/org/craftsrecords/talkadvisor/TalkAdvisorApplication.kt
...n/org/craftsrecords/talkadvisor/TalkAdvisorApplication.kt
+2
-2
talkadvisor-infra/src/main/resources/application.properties
talkadvisor-infra/src/main/resources/application.properties
+0
-1
talkadvisor-infra/src/main/resources/application.yml
talkadvisor-infra/src/main/resources/application.yml
+4
-0
talkadvisor-infra/src/test/kotlin/org/craftsrecords/talkadvisor/TalkAdvisorApplicationTests.kt
.../craftsrecords/talkadvisor/TalkAdvisorApplicationTests.kt
+17
-0
No files found.
pom.xml
View file @
f501578e
...
...
@@ -15,15 +15,25 @@
<properties>
<java.version>
1.8
</java.version>
<kotlin.version>
1.3.0
</kotlin.version>
<kotlin.version>
1.3.21
</kotlin.version>
<junit.jupiter.version>
5.4.0
</junit.jupiter.version>
<junit.version>
4.12
</junit.version>
<cucumber.version>
4.2.3
</cucumber.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<junit-platform.version>
1.4.0
</junit-platform.version>
</properties>
<build>
<sourceDirectory>
talkadvisor-infra/src/main/kotlin
</sourceDirectory>
<testSourceDirectory>
${project.basedir}/src/test/kotlin
</testSourceDirectory>
<plugins>
<plugin>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-maven-plugin
</artifactId>
<version>
${kotlin.version}
</version>
</plugin>
<plugin>
<artifactId>
maven-failsafe-plugin
</artifactId>
</plugin>
<plugin>
<artifactId>
maven-enforcer-plugin
</artifactId>
</plugin>
</plugins>
<pluginManagement>
...
...
@@ -31,6 +41,53 @@
<plugin>
<artifactId>
maven-enforcer-plugin
</artifactId>
<version>
3.0.0-M2
</version>
<executions>
<execution>
<id>
dependencies-sanitization
</id>
<goals>
<goal>
enforce
</goal>
</goals>
<configuration>
<rules>
<dependencyConvergence/>
<requireUpperBoundDeps/>
<requirePluginVersions/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
3.0.0-M3
</version>
</plugin>
<plugin>
<artifactId>
maven-clean-plugin
</artifactId>
<version>
3.1.0
</version>
</plugin>
<plugin>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
3.1.0
</version>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.0
</version>
</plugin>
<plugin>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
3.1.1
</version>
</plugin>
<plugin>
<artifactId>
maven-install-plugin
</artifactId>
<version>
3.0.0-M1
</version>
</plugin>
<plugin>
<artifactId>
maven-site-plugin
</artifactId>
<version>
3.7.1
</version>
</plugin>
<plugin>
<artifactId>
maven-deploy-plugin
</artifactId>
<version>
3.0.0-M1
</version>
</plugin>
<plugin>
<groupId>
org.jetbrains.kotlin
</groupId>
...
...
@@ -43,7 +100,35 @@
<compilerPlugins>
<plugin>
spring
</plugin>
</compilerPlugins>
<jvmTarget>
1.8
</jvmTarget>
<javaParameters>
true
</javaParameters>
</configuration>
<executions>
<execution>
<id>
compile
</id>
<phase>
compile
</phase>
<goals>
<goal>
compile
</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>
${project.basedir}/src/main/kotlin
</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>
test-compile
</id>
<phase>
test-compile
</phase>
<goals>
<goal>
test-compile
</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>
${project.basedir}/src/test/kotlin
</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
...
...
@@ -52,6 +137,18 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>
maven-failsafe-plugin
</artifactId>
<version>
3.0.0-M3
</version>
<executions>
<execution>
<goals>
<goal>
integration-test
</goal>
<goal>
verify
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
...
...
@@ -64,9 +161,81 @@
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-engine
</artifactId>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.junit.platform
</groupId>
<artifactId>
junit-platform-launcher
</artifactId>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test
</artifactId>
<version>
${kotlin.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<dependencyManagement>
<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.platform
</groupId>
<artifactId>
junit-platform-commons
</artifactId>
<version>
${junit-platform.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.junit.platform
</groupId>
<artifactId>
junit-platform-engine
</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>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-engine
</artifactId>
<version>
${junit.jupiter.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.junit.vintage
</groupId>
<artifactId>
junit-vintage-engine
</artifactId>
<version>
${junit.jupiter.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
io.cucumber
</groupId>
<artifactId>
cucumber-junit
</artifactId>
<version>
${cucumber.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
io.cucumber
</groupId>
<artifactId>
cucumber-java8
</artifactId>
<version>
${cucumber.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-reflect
</artifactId>
...
...
@@ -87,6 +256,11 @@
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
<version>
${kotlin.version}
</version>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk7
</artifactId>
<version>
${kotlin.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
talkadvisor-domain/pom.xml
View file @
f501578e
...
...
@@ -39,4 +39,22 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>
io.cucumber
</groupId>
<artifactId>
cucumber-java8
</artifactId>
</dependency>
<dependency>
<groupId>
io.cucumber
</groupId>
<artifactId>
cucumber-junit
</artifactId>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
<dependency>
<groupId>
org.junit.vintage
</groupId>
<artifactId>
junit-vintage-engine
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
talkadvisor-domain/src/test/kotlin/org/craftsrecords/RunCucumberTest.kt
0 → 100644
View file @
f501578e
package
org.craftsrecords
import
cucumber.api.CucumberOptions
import
cucumber.api.junit.Cucumber
import
org.junit.runner.RunWith
@RunWith
(
Cucumber
::
class
)
@CucumberOptions
(
strict
=
true
,
plugin
=
[
"pretty"
,
"html:target/cucumber"
],
features
=
[
"classpath:features/"
])
class
RunCucumberTest
\ No newline at end of file
talkadvisor-infra/pom.xml
View file @
f501578e
...
...
@@ -17,7 +17,7 @@
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring-boot.version}
</version>
<version>
2.1.2.RELEASE
</version>
</plugin>
</plugins>
</build>
...
...
talkadvisor-infra/src/main/kotlin/org/craftsrecords/talkadvisor/Talk
a
dvisorApplication.kt
→
talkadvisor-infra/src/main/kotlin/org/craftsrecords/talkadvisor/Talk
A
dvisorApplication.kt
View file @
f501578e
...
...
@@ -4,9 +4,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
import
org.springframework.boot.runApplication
@SpringBootApplication
class
Talk
a
dvisorApplication
class
Talk
A
dvisorApplication
fun
main
(
args
:
Array
<
String
>)
{
runApplication
<
Talk
a
dvisorApplication
>(*
args
)
runApplication
<
Talk
A
dvisorApplication
>(*
args
)
}
talkadvisor-infra/src/main/resources/application.properties
deleted
100644 → 0
View file @
005790b9
talkadvisor-infra/src/main/resources/application.yml
0 → 100644
View file @
f501578e
spring
:
output
:
ansi.enabled
:
always
talkadvisor-infra/src/test/kotlin/org/craftsrecords/talkadvisor/Talk
a
dvisorApplicationTests.kt
→
talkadvisor-infra/src/test/kotlin/org/craftsrecords/talkadvisor/Talk
A
dvisorApplicationTests.kt
View file @
f501578e
package
org.craftsrecords.talkadvisor
import
org.junit.Test
import
org.junit.
runner.Run
With
import
org.junit.
jupiter.api.
Test
import
org.junit.
jupiter.api.extension.Extend
With
import
org.springframework.boot.test.context.SpringBootTest
import
org.springframework.test.context.junit
4.SpringRunner
import
org.springframework.test.context.junit
.jupiter.SpringExtension
@
Run
With
(
Spring
Runner
::
class
)
@
Extend
With
(
Spring
Extension
::
class
)
@SpringBootTest
class
Talk
a
dvisorApplicationTests
{
class
Talk
A
dvisorApplicationTests
{
@Test
fun
contextLoads
()
{
}
@Test
fun
contextLoads
()
{
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment