File tree 11 files changed +27
-128
lines changed
resources/io/cucumber/spring
examples/spring-java-junit5
src/main/java/io/cucumber/examples/spring/application
11 files changed +27
-128
lines changed Original file line number Diff line number Diff line change 14
14
<properties >
15
15
<apiguardian-api .version>1.1.2</apiguardian-api .version>
16
16
<hamcrest .version>2.2</hamcrest .version>
17
- <javax .servlet-api.version>4.0.1</javax .servlet-api.version>
18
17
<junit-jupiter .version>5.9.1</junit-jupiter .version>
19
- <spring .version>5.3.24 </spring .version>
18
+ <spring .version>6.0.3 </spring .version>
20
19
<project .Automatic-Module-Name>io.cucumber.spring</project .Automatic-Module-Name>
21
20
<mockito .version>4.11.0</mockito .version>
22
21
</properties >
65
64
<version >${apiguardian-api.version} </version >
66
65
</dependency >
67
66
68
- <dependency >
69
- <groupId >org.springframework</groupId >
70
- <artifactId >spring-web</artifactId >
71
- <version >${spring.version} </version >
72
- <scope >test</scope >
73
- </dependency >
74
- <dependency >
75
- <groupId >org.springframework</groupId >
76
- <artifactId >spring-webmvc</artifactId >
77
- <version >${spring.version} </version >
78
- <scope >test</scope >
79
- </dependency >
80
- <dependency >
81
- <groupId >javax.servlet</groupId >
82
- <artifactId >javax.servlet-api</artifactId >
83
- <version >${javax.servlet-api.version} </version >
84
- <scope >test</scope >
85
- </dependency >
86
-
87
67
<dependency >
88
68
<groupId >io.cucumber</groupId >
89
69
<artifactId >cucumber-java</artifactId >
Original file line number Diff line number Diff line change 4
4
import org .springframework .test .context .ContextConfiguration ;
5
5
import org .springframework .test .context .web .WebAppConfiguration ;
6
6
7
- @ WebAppConfiguration
8
7
@ ContextConfiguration ("classpath:cucumber.xml" )
9
8
@ CucumberContextConfiguration
10
9
public class AnnotationContextConfiguration {
Original file line number Diff line number Diff line change 2
2
3
3
import io .cucumber .java .en .Then ;
4
4
import org .springframework .beans .factory .annotation .Autowired ;
5
- import org .springframework .web . context .WebApplicationContext ;
5
+ import org .springframework .context .ApplicationContext ;
6
6
7
7
import static org .junit .jupiter .api .Assertions .assertNotNull ;
8
8
9
9
public class AnnotationContextConfigurationDefinitions {
10
10
11
11
@ Autowired
12
- private WebApplicationContext wac ;
12
+ private ApplicationContext context ;
13
13
14
14
@ Then ("cucumber picks up configuration class without step defs" )
15
15
public void pickUpContext () {
16
- assertNotNull (wac );
16
+ assertNotNull (context );
17
17
}
18
18
19
19
}
Original file line number Diff line number Diff line change 1
1
package io .cucumber .spring .beans ;
2
2
3
- import org .springframework .stereotype .Component ;
4
- import org .springframework .web .bind .annotation .RequestMapping ;
5
- import org .springframework .web .bind .annotation .RequestMethod ;
6
- import org .springframework .web .bind .annotation .ResponseBody ;
3
+ import org .springframework .stereotype .Controller ;
7
4
8
- @ Component
9
- @ RequestMapping (TestController .BASE_URL )
5
+ @ Controller
10
6
public class TestController {
11
7
12
- public static final String BASE_URL = "/test" ;
13
-
14
- @ ResponseBody
15
- @ RequestMapping (method = RequestMethod .GET )
16
- public String test () {
17
- return "ok" ;
18
- }
19
-
20
8
}
Original file line number Diff line number Diff line change 18
18
import static org .junit .jupiter .api .Assertions .assertSame ;
19
19
20
20
@ CucumberContextConfiguration
21
- @ WebAppConfiguration
22
21
@ ContextConfiguration ("classpath:cucumber.xml" )
23
22
public class ThreadingStepDefinitions {
24
23
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 12
12
13
13
<properties >
14
14
<project .Automatic-Module-Name>io.cucumber.examples.spring.application</project .Automatic-Module-Name>
15
- <spring-boot .version>2.6.0 </spring-boot .version>
16
- <junit-jupiter .version>5.8.2 </junit-jupiter .version>
15
+ <spring-boot .version>3.0.1 </spring-boot .version>
16
+ <junit-jupiter .version>5.9.1 </junit-jupiter .version>
17
17
</properties >
18
18
19
19
<dependencyManagement >
Original file line number Diff line number Diff line change 1
1
package io .cucumber .examples .spring .application ;
2
2
3
- import javax .persistence .Access ;
4
- import javax .persistence .AccessType ;
5
- import javax .persistence .Basic ;
6
- import javax .persistence .Entity ;
7
- import javax .persistence .GeneratedValue ;
8
- import javax .persistence .GenerationType ;
9
- import javax .persistence .Id ;
10
- import javax .persistence .ManyToOne ;
11
- import javax .persistence .Table ;
3
+ import jakarta .persistence .Access ;
4
+ import jakarta .persistence .AccessType ;
5
+ import jakarta .persistence .Basic ;
6
+ import jakarta .persistence .Entity ;
7
+ import jakarta .persistence .GeneratedValue ;
8
+ import jakarta .persistence .GenerationType ;
9
+ import jakarta .persistence .Id ;
10
+ import jakarta .persistence .ManyToOne ;
11
+ import jakarta .persistence .Table ;
12
12
13
13
import java .io .Serializable ;
14
14
import java .util .StringJoiner ;
Original file line number Diff line number Diff line change 1
1
package io .cucumber .examples .spring .application ;
2
2
3
- import javax .persistence .Access ;
4
- import javax .persistence .AccessType ;
5
- import javax .persistence .Basic ;
6
- import javax .persistence .Entity ;
7
- import javax .persistence .FetchType ;
8
- import javax .persistence .GeneratedValue ;
9
- import javax .persistence .GenerationType ;
10
- import javax .persistence .Id ;
11
- import javax .persistence .OneToMany ;
12
- import javax .persistence .Table ;
3
+ import jakarta .persistence .Access ;
4
+ import jakarta .persistence .AccessType ;
5
+ import jakarta .persistence .Basic ;
6
+ import jakarta .persistence .Entity ;
7
+ import jakarta .persistence .FetchType ;
8
+ import jakarta .persistence .GeneratedValue ;
9
+ import jakarta .persistence .GenerationType ;
10
+ import jakarta .persistence .Id ;
11
+ import jakarta .persistence .OneToMany ;
12
+ import jakarta .persistence .Table ;
13
13
14
14
import java .io .Serializable ;
15
15
import java .util .List ;
You can’t perform that action at this time.
0 commit comments