This commit is contained in:
Michael Minella
2018-10-31 22:11:01 -05:00
parent d2bc2530cc
commit 90c88c52e6
29 changed files with 197 additions and 205 deletions

View File

@@ -91,7 +91,7 @@ public class JpaApplicationTests {
public OutputCapture outputCapture = new OutputCapture();
@Test
public void testBatchJobApp() throws Exception {
public void testBatchJobApp() {
final String INSERT_MESSAGE = "Hibernate: insert into task_run_output (";
SpringApplication.run(JpaApplication.class, "--spring.datasource.url=" + DATASOURCE_URL,
"--spring.datasource.username=" + DATASOURCE_USER_NAME,
@@ -101,7 +101,7 @@ public class JpaApplicationTests {
assertTrue("Unable to find the insert message: " + output, output.contains(INSERT_MESSAGE));
JdbcTemplate template = new JdbcTemplate(this.dataSource);
Map<String, Object> result = template.queryForMap("Select * from TASK_RUN_OUTPUT");
assertThat((Long)(result.get("ID")), is(1L));
assertThat(result.get("ID"), is(1L));
assertThat(((String) result.get("OUTPUT")), containsString("Executed at"));
}