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 33
44import lombok .extern .slf4j .Slf4j ;
55import org .junit .jupiter .api .Assertions ;
6- import org .junit .jupiter .api .BeforeEach ;
6+ import org .junit .jupiter .api .BeforeAll ;
77import org .junit .jupiter .api .Test ;
8+ import org .junit .jupiter .api .TestInstance ;
89import org .lowcoder .api .application .ApplicationEndpoints .CreateApplicationRequest ;
910import org .lowcoder .api .application .view .ApplicationPermissionView ;
1011import org .lowcoder .api .application .view .ApplicationView ;
3637//@RunWith(SpringRunner.class)
3738@ ActiveProfiles ("ApplicationApiServiceTest" )
3839@ Slf4j (topic = "ApplicationApiServiceTest" )
40+
41+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
3942public class ApplicationApiServiceTest {
4043
4144 @ Autowired
@@ -49,8 +52,8 @@ public class ApplicationApiServiceTest {
4952 @ Autowired
5053 private InitData initData ;
5154
52- @ BeforeEach
53- public void beforeEach () {
55+ @ BeforeAll
56+ public void beforeAll () {
5457 initData .init ();
5558 }
5659
Original file line number Diff line number Diff line change 22
33import org .apache .commons .collections4 .MapUtils ;
44import org .junit .jupiter .api .Assertions ;
5- import org .junit .jupiter .api .BeforeEach ;
5+ import org .junit .jupiter .api .BeforeAll ;
66import org .junit .jupiter .api .Test ;
7+ import org .junit .jupiter .api .TestInstance ;
78import org .lowcoder .api .common .InitData ;
89import org .lowcoder .api .common .mockuser .WithMockUser ;
910import org .lowcoder .sdk .constants .DslConstants .CompoundAppDslConstants ;
1920@ SpringBootTest
2021@ ActiveProfiles ("test" )
2122//@RunWith(SpringRunner.class)
23+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
2224public class CompoundApplicationDslFilterTest {
2325
2426 @ Autowired
2527 private CompoundApplicationDslFilter filter ;
2628 @ Autowired
2729 private InitData initData ;
2830
29- @ BeforeEach
30- public void beforeEach () {
31+ @ BeforeAll
32+ public void beforeAll () {
3133 initData .init ();
3234 }
3335
Original file line number Diff line number Diff line change 11package org .lowcoder .api .bundle ;
22
33import org .junit .jupiter .api .Assertions ;
4- import org .junit .jupiter .api .BeforeEach ;
4+ import org .junit .jupiter .api .BeforeAll ;
55import org .junit .jupiter .api .Test ;
6+ import org .junit .jupiter .api .TestInstance ;
67import org .lowcoder .api .bundle .view .BundleInfoView ;
78import org .lowcoder .api .bundle .view .BundlePermissionView ;
89import org .lowcoder .api .common .InitData ;
3334@ SpringBootTest
3435//@RunWith(SpringRunner.class)
3536@ ActiveProfiles ("BundleApiServiceImplTest" )
37+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
3638public class BundleApiServiceImplTest {
3739 @ Autowired
3840 BundleApiServiceImpl bundleApiService ;
@@ -43,8 +45,8 @@ public class BundleApiServiceImplTest {
4345 @ Autowired
4446 private InitData initData ;
4547
46- @ BeforeEach
47- public void beforeEach () {
48+ @ BeforeAll
49+ public void beforeAll () {
4850 initData .init ();
4951 }
5052
Original file line number Diff line number Diff line change 11package org .lowcoder .api .service ;
22
33import org .junit .jupiter .api .Assertions ;
4- import org .junit .jupiter .api .BeforeEach ;
4+ import org .junit .jupiter .api .BeforeAll ;
55import org .junit .jupiter .api .Test ;
6+ import org .junit .jupiter .api .TestInstance ;
67import org .lowcoder .api .application .view .ApplicationInfoView ;
78import org .lowcoder .api .application .view .ApplicationPermissionView ;
89import org .lowcoder .api .common .InitData ;
2930@ SpringBootTest
3031@ ActiveProfiles ("test" )
3132//@RunWith(SpringRunner.class)
33+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
3234public class FolderApiServiceTest {
3335
3436 @ Autowired
@@ -38,8 +40,8 @@ public class FolderApiServiceTest {
3840 @ Autowired
3941 private InitData initData ;
4042
41- @ BeforeEach
42- public void beforeEach () {
43+ @ BeforeAll
44+ public void beforeAll () {
4345 initData .init ();
4446 }
4547
You can’t perform that action at this time.
0 commit comments