File tree Expand file tree Collapse file tree 4 files changed +6
-0
lines changed
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util
src/main/kotlin/org/utbot/spring/dummy Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ jakartaVersion=3.1.0
99
99
# use latest Java 8 compaitable Spring and Spring Boot versions
100
100
springVersion =5.3.28
101
101
springBootVersion =2.7.13
102
+ springSecurityVersion =5.8.5
102
103
103
104
# configuration for build server
104
105
#
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ object SpringModelUtils {
24
24
val transactionalClassId = ClassId (" org.springframework.transaction.annotation.Transactional" )
25
25
val autoConfigureTestDbClassId = ClassId (" org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase" )
26
26
val autoConfigureMockMvcClassId = ClassId (" org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc" )
27
+ val withMockUserClassId = ClassId (" org.springframework.security.test.context.support.WithMockUser" )
27
28
28
29
val runWithClassId = ClassId (" org.junit.runner.RunWith" )
29
30
val springRunnerClassId = ClassId (" org.springframework.test.context.junit4.SpringRunner" )
Original file line number Diff line number Diff line change 1
1
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
2
2
3
3
val springVersion: String by rootProject
4
+ val springSecurityVersion: String by rootProject
4
5
val springBootVersion: String by rootProject
5
6
val javaxVersion: String by rootProject
6
7
val jakartaVersion: String by rootProject
@@ -26,6 +27,7 @@ dependencies {
26
27
compileOnly(" org.springframework:spring-test:$springVersion " )
27
28
compileOnly(" org.springframework:spring-tx:$springVersion " )
28
29
compileOnly(" org.springframework:spring-web:$springVersion " )
30
+ compileOnly(" org.springframework.security:spring-security-test:$springSecurityVersion " )
29
31
compileOnly(" org.springframework.data:spring-data-commons:$springBootVersion " )
30
32
31
33
compileOnly(" javax.persistence:javax.persistence-api:$javaxVersion " )
Original file line number Diff line number Diff line change 1
1
package org.utbot.spring.dummy
2
2
3
+ import org.springframework.security.test.context.support.WithMockUser
3
4
import org.springframework.test.context.ActiveProfiles
4
5
import org.springframework.test.context.ContextConfiguration
5
6
import org.springframework.transaction.annotation.Isolation
@@ -8,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional
8
9
@ActiveProfiles(/* fills dynamically */ )
9
10
@ContextConfiguration(/* fills dynamically */ )
10
11
@Transactional(isolation = Isolation .SERIALIZABLE )
12
+ @WithMockUser
11
13
abstract class DummySpringIntegrationTestClass {
12
14
@javax.persistence.PersistenceContext
13
15
@jakarta.persistence.PersistenceContext
You can’t perform that action at this time.
0 commit comments