File tree 3 files changed +13
-14
lines changed
src/test/java/ch/xxx/maps/adapter/controller
3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 12
12
*/
13
13
plugins {
14
14
id ' java'
15
- id ' org.springframework.boot' version ' 3.3 .0'
16
- id ' org.graalvm.buildtools.native' version ' 0.10.2 '
17
- id ' io.spring.dependency-management' version ' 1.1.4 '
18
- id ' org.hibernate.orm' version ' 6.3.1 .Final'
15
+ id ' org.springframework.boot' version ' 3.4 .0'
16
+ id ' org.graalvm.buildtools.native' version ' 0.10.3 '
17
+ id ' io.spring.dependency-management' version ' 1.1.6 '
18
+ id ' org.hibernate.orm' version ' 6.6.3 .Final'
19
19
}
20
20
21
21
group = ' ch.xxx'
@@ -49,7 +49,7 @@ dependencies {
49
49
testImplementation ' org.springframework.boot:spring-boot-starter-test'
50
50
testImplementation ' org.springframework.security:spring-security-test'
51
51
testImplementation ' org.springframework.graphql:spring-graphql-test'
52
- testImplementation group : ' com.tngtech.archunit' , name : ' archunit-junit5' , version : ' 1.2 .0'
52
+ testImplementation group : ' com.tngtech.archunit' , name : ' archunit-junit5' , version : ' 1.3 .0'
53
53
54
54
if (project. hasProperty(' withAngular' )) {
55
55
implementation ' org.postgresql:postgresql'
Original file line number Diff line number Diff line change 12
12
*/
13
13
package ch .xxx .maps .adapter .controller ;
14
14
15
- import org .springframework .boot . test .mock . mockito .MockBean ;
15
+ import org .springframework .test .context . bean . override . mockito .MockitoBean ;
16
16
17
17
import ch .xxx .maps .adapter .repository .JpaCompanySiteRepository ;
18
18
import ch .xxx .maps .adapter .repository .JpaLocationRepository ;
19
19
import ch .xxx .maps .adapter .repository .JpaPolygonRepository ;
20
20
import ch .xxx .maps .adapter .repository .JpaRingRepository ;
21
21
22
22
public class BaseControllerTest {
23
- @ MockBean
23
+ @ MockitoBean
24
24
protected JpaCompanySiteRepository jpaCompanySiteRepository ;
25
- @ MockBean
25
+ @ MockitoBean
26
26
protected JpaLocationRepository jpaLocationRepository ;
27
- @ MockBean
27
+ @ MockitoBean
28
28
protected JpaPolygonRepository jpaPolygonRepository ;
29
- @ MockBean
29
+ @ MockitoBean
30
30
protected JpaRingRepository jpaRingRepository ;
31
31
}
Original file line number Diff line number Diff line change 21
21
import java .util .Set ;
22
22
23
23
import org .junit .jupiter .api .BeforeEach ;
24
- import org .junit .jupiter .api .Test ;
25
24
import org .mockito .Mockito ;
26
25
import org .springframework .beans .factory .annotation .Autowired ;
27
26
import org .springframework .boot .test .autoconfigure .graphql .tester .AutoConfigureGraphQlTester ;
28
27
import org .springframework .boot .test .context .SpringBootTest ;
29
- import org .springframework .boot .test .mock .mockito .MockBean ;
30
28
import org .springframework .context .annotation .ComponentScan ;
31
29
import org .springframework .graphql .test .tester .GraphQlTester ;
30
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
32
31
33
32
import ch .xxx .maps .domain .model .dto .CompanySiteDto ;
34
33
import ch .xxx .maps .domain .model .entity .CompanySite ;
44
43
//,excludeFilters = @Filter(type = FilterType.REGEX, pattern = ".*\\.(adapter|usecase)\\.(repository|service).*")
45
44
)
46
45
public class CompanySiteControllerTest extends BaseControllerTest {
47
- @ MockBean
46
+ @ MockitoBean
48
47
private CompanySiteService companySiteService ;
49
- @ MockBean
48
+ @ MockitoBean
50
49
private EntityDtoMapper entityDtoMapper ;
51
50
@ Autowired
52
51
private GraphQlTester graphQlTester ;
You can’t perform that action at this time.
0 commit comments