Skip to content

Commit d445d66

Browse files
committed
build: simplified dependencies
Signed-off-by: Paul Williams <[email protected]>
1 parent 06bec29 commit d445d66

File tree

5 files changed

+14
-49
lines changed

5 files changed

+14
-49
lines changed

Diff for: acceptance-test/pom.xml

+1-19
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,18 @@
3131
<artifactId>cucumber-java8</artifactId>
3232
<version>${cucumber.version}</version>
3333
<scope>test</scope>
34-
<exclusions>
35-
<exclusion>
36-
<artifactId>apiguardian-api</artifactId>
37-
<groupId>org.apiguardian</groupId>
38-
</exclusion>
39-
</exclusions>
4034
</dependency>
4135
<dependency>
4236
<groupId>io.cucumber</groupId>
43-
<artifactId>cucumber-junit</artifactId>
37+
<artifactId>cucumber-junit-platform-engine</artifactId>
4438
<version>${cucumber.version}</version>
4539
<scope>test</scope>
46-
<exclusions>
47-
<exclusion>
48-
<artifactId>apiguardian-api</artifactId>
49-
<groupId>org.apiguardian</groupId>
50-
</exclusion>
51-
</exclusions>
5240
</dependency>
5341
<dependency>
5442
<groupId>io.cucumber</groupId>
5543
<artifactId>cucumber-spring</artifactId>
5644
<version>${cucumber.version}</version>
5745
<scope>test</scope>
58-
<exclusions>
59-
<exclusion>
60-
<artifactId>apiguardian-api</artifactId>
61-
<groupId>org.apiguardian</groupId>
62-
</exclusion>
63-
</exclusions>
6446
</dependency>
6547
</dependencies>
6648
<build>

Diff for: acceptance-test/src/test/kotlin/packagename/AcceptanceTest.kt

-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import org.assertj.core.api.Assertions.assertThat
44
import org.assertj.core.api.Assertions.assertThatThrownBy
55
import org.junit.jupiter.api.Test
66
import org.junit.jupiter.api.extension.ExtendWith
7-
import org.junit.platform.runner.JUnitPlatform
8-
import org.junit.runner.RunWith
97
import org.mockito.Mock
108
import org.mockito.Mockito
119
import org.mockito.junit.jupiter.MockitoExtension
@@ -16,7 +14,6 @@ import packagename.domain.port.ObtainExample
1614
import java.util.*
1715

1816
@ExtendWith(MockitoExtension::class)
19-
@RunWith(JUnitPlatform::class)
2017
class AcceptanceTest {
2118

2219
@Test

Diff for: acceptance-test/src/test/kotlin/packagename/cucumber/ExampleStepDef.kt

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/*
21
package packagename.cucumber
32

43
import io.cucumber.datatable.DataTable
@@ -39,9 +38,8 @@ class ExampleStepDef(restTemplate: TestRestTemplate, exampleDao: ExampleDao) : E
3938

4039
init {
4140

42-
*/
43-
/*DataTableType { row: Map<String, String> -> Example(row["code"].toString().toLong(), row["description"].toString()) }
44-
DataTableType { row: Map<String, String> -> ExampleEntity(code = row["code"].toString().toLong(), description = row["description"].toString()) }*//*
41+
// DataTableType { row: Map<String, String> -> Example(row["code"].toString().toLong(), row["description"].toString()) }
42+
// DataTableType { row: Map<String, String> -> ExampleEntity(code = row["code"].toString().toLong(), description = row["description"].toString()) }
4543

4644

4745
Before { _ -> exampleDao.deleteAll() }
@@ -90,4 +88,3 @@ class ExampleStepDef(restTemplate: TestRestTemplate, exampleDao: ExampleDao) : E
9088
}
9189

9290

93-
*/
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
package packagename.cucumber
22

3-
import io.cucumber.core.options.Constants.FILTER_TAGS_PROPERTY_NAME
4-
import io.cucumber.core.options.Constants.GLUE_PROPERTY_NAME
3+
import io.cucumber.junit.platform.engine.Constants.*
54
import org.junit.platform.suite.api.*
65

76
@Suite
87
@IncludeEngines("cucumber")
9-
@SelectClasspathResource("features/example.feature")
10-
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "packagename.cucumber")
11-
@ConfigurationParameters(ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "packagename.cucumber"), ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@Example"))
8+
@SelectClasspathResource("features")
9+
@ConfigurationParameters(
10+
ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "packagename.cucumber"), // this is the part where the stepdef file is
11+
ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@Example"),
12+
ConfigurationParameter(key = JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME, value = "long"),
13+
ConfigurationParameter(key = PLUGIN_PUBLISH_QUIET_PROPERTY_NAME, value = "true"),
14+
ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "json:target/cucumber/cucumber.json")
15+
)
1216
class RunCucumberExampleTest

Diff for: pom.xml

+2-17
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,12 @@
119119
<!-- JUnit 5 dependencies -->
120120
<dependency>
121121
<groupId>org.junit.jupiter</groupId>
122-
<artifactId>junit-jupiter-engine</artifactId>
122+
<artifactId>junit-jupiter</artifactId>
123123
<scope>test</scope>
124124
</dependency>
125125
<dependency>
126126
<groupId>org.junit.platform</groupId>
127-
<artifactId>junit-platform-engine</artifactId>
128-
<scope>test</scope>
129-
</dependency>
130-
<dependency>
131-
<groupId>org.junit.vintage</groupId>
132-
<artifactId>junit-vintage-engine</artifactId>
133-
<scope>test</scope>
134-
</dependency>
135-
<dependency>
136-
<groupId>org.junit.platform</groupId>
137-
<artifactId>junit-platform-launcher</artifactId>
138-
<scope>test</scope>
139-
</dependency>
140-
<dependency>
141-
<groupId>org.junit.platform</groupId>
142-
<artifactId>junit-platform-runner</artifactId>
127+
<artifactId>junit-platform-suite</artifactId>
143128
<scope>test</scope>
144129
</dependency>
145130
<!-- mockito dependencies -->

0 commit comments

Comments
 (0)