Skip to content

Commit 8e1f835

Browse files
add test
1 parent b83a4f6 commit 8e1f835

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.example.batch;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
import static org.junit.jupiter.api.Assertions.*;
7+
8+
@SpringBootTest
9+
class BatchAppTest {
10+
11+
@Test
12+
void contextLoads() {
13+
// Confirm that the Spring application context loads without errors
14+
}
15+
16+
@Test
17+
void mainMethodTest() {
18+
// Arrange
19+
String[] args = {"--spring.batch.job.enabled=false"};
20+
21+
// Act
22+
BatchApp.main(args);
23+
24+
// Assert
25+
// No exceptions should occur
26+
}
27+
}

0 commit comments

Comments
 (0)