Skip to content

Commit

Permalink
feat : adds IntegrationTest for JobInvoker
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Dec 19, 2024
1 parent f193822 commit d1910c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion batch-boot-jpa-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
<configuration>
<java>
<googleJavaFormat>
<version>1.25.0</version>
<version>1.25.2</version>
<style>AOSP</style>
</googleJavaFormat>
<importOrder />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.bootbatchjpa.web.controllers;

import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import com.example.bootbatchjpa.common.AbstractIntegrationTest;
import org.junit.jupiter.api.Test;

class JobInvokerControllerIT extends AbstractIntegrationTest {

@Test
void shouldInvokeAllCustomersJob() throws Exception {
mockMvc.perform(get("/api/job/customers").param("minId", "0").param("maxId", "100"))
.andExpect(status().isOk())
.andExpect(content().string(containsString("Batch job has been invoked as")));
}
}

0 comments on commit d1910c9

Please sign in to comment.