File tree Expand file tree Collapse file tree 4 files changed +21
-12
lines changed
server/api-service/lowcoder-server/src/test/java/org/lowcoder/api Expand file tree Collapse file tree 4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import lombok .extern .slf4j .Slf4j ;
5
5
import org .junit .jupiter .api .Assertions ;
6
- import org .junit .jupiter .api .BeforeEach ;
6
+ import org .junit .jupiter .api .BeforeAll ;
7
7
import org .junit .jupiter .api .Test ;
8
+ import org .junit .jupiter .api .TestInstance ;
8
9
import org .lowcoder .api .application .ApplicationEndpoints .CreateApplicationRequest ;
9
10
import org .lowcoder .api .application .view .ApplicationPermissionView ;
10
11
import org .lowcoder .api .application .view .ApplicationView ;
36
37
//@RunWith(SpringRunner.class)
37
38
@ ActiveProfiles ("ApplicationApiServiceTest" )
38
39
@ Slf4j (topic = "ApplicationApiServiceTest" )
40
+
41
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
39
42
public class ApplicationApiServiceTest {
40
43
41
44
@ Autowired
@@ -49,8 +52,8 @@ public class ApplicationApiServiceTest {
49
52
@ Autowired
50
53
private InitData initData ;
51
54
52
- @ BeforeEach
53
- public void beforeEach () {
55
+ @ BeforeAll
56
+ public void beforeAll () {
54
57
initData .init ();
55
58
}
56
59
Original file line number Diff line number Diff line change 2
2
3
3
import org .apache .commons .collections4 .MapUtils ;
4
4
import org .junit .jupiter .api .Assertions ;
5
- import org .junit .jupiter .api .BeforeEach ;
5
+ import org .junit .jupiter .api .BeforeAll ;
6
6
import org .junit .jupiter .api .Test ;
7
+ import org .junit .jupiter .api .TestInstance ;
7
8
import org .lowcoder .api .common .InitData ;
8
9
import org .lowcoder .api .common .mockuser .WithMockUser ;
9
10
import org .lowcoder .sdk .constants .DslConstants .CompoundAppDslConstants ;
19
20
@ SpringBootTest
20
21
@ ActiveProfiles ("test" )
21
22
//@RunWith(SpringRunner.class)
23
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
22
24
public class CompoundApplicationDslFilterTest {
23
25
24
26
@ Autowired
25
27
private CompoundApplicationDslFilter filter ;
26
28
@ Autowired
27
29
private InitData initData ;
28
30
29
- @ BeforeEach
30
- public void beforeEach () {
31
+ @ BeforeAll
32
+ public void beforeAll () {
31
33
initData .init ();
32
34
}
33
35
Original file line number Diff line number Diff line change 1
1
package org .lowcoder .api .bundle ;
2
2
3
3
import org .junit .jupiter .api .Assertions ;
4
- import org .junit .jupiter .api .BeforeEach ;
4
+ import org .junit .jupiter .api .BeforeAll ;
5
5
import org .junit .jupiter .api .Test ;
6
+ import org .junit .jupiter .api .TestInstance ;
6
7
import org .lowcoder .api .bundle .view .BundleInfoView ;
7
8
import org .lowcoder .api .bundle .view .BundlePermissionView ;
8
9
import org .lowcoder .api .common .InitData ;
33
34
@ SpringBootTest
34
35
//@RunWith(SpringRunner.class)
35
36
@ ActiveProfiles ("BundleApiServiceImplTest" )
37
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
36
38
public class BundleApiServiceImplTest {
37
39
@ Autowired
38
40
BundleApiServiceImpl bundleApiService ;
@@ -43,8 +45,8 @@ public class BundleApiServiceImplTest {
43
45
@ Autowired
44
46
private InitData initData ;
45
47
46
- @ BeforeEach
47
- public void beforeEach () {
48
+ @ BeforeAll
49
+ public void beforeAll () {
48
50
initData .init ();
49
51
}
50
52
Original file line number Diff line number Diff line change 1
1
package org .lowcoder .api .service ;
2
2
3
3
import org .junit .jupiter .api .Assertions ;
4
- import org .junit .jupiter .api .BeforeEach ;
4
+ import org .junit .jupiter .api .BeforeAll ;
5
5
import org .junit .jupiter .api .Test ;
6
+ import org .junit .jupiter .api .TestInstance ;
6
7
import org .lowcoder .api .application .view .ApplicationInfoView ;
7
8
import org .lowcoder .api .application .view .ApplicationPermissionView ;
8
9
import org .lowcoder .api .common .InitData ;
29
30
@ SpringBootTest
30
31
@ ActiveProfiles ("test" )
31
32
//@RunWith(SpringRunner.class)
33
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
32
34
public class FolderApiServiceTest {
33
35
34
36
@ Autowired
@@ -38,8 +40,8 @@ public class FolderApiServiceTest {
38
40
@ Autowired
39
41
private InitData initData ;
40
42
41
- @ BeforeEach
42
- public void beforeEach () {
43
+ @ BeforeAll
44
+ public void beforeAll () {
43
45
initData .init ();
44
46
}
45
47
You can’t perform that action at this time.
0 commit comments