Skip to content

Instantly share code, notes, and snippets.

@jeromevdl
Last active June 22, 2018 09:38
Show Gist options
  • Save jeromevdl/a09052b4625448d680bfeed09a966fa7 to your computer and use it in GitHub Desktop.
Save jeromevdl/a09052b4625448d680bfeed09a966fa7 to your computer and use it in GitHub Desktop.
@RunWith(SpringRunner.class)
@SpringBootTest
@Sql(scripts = "/setup_data_integration_test.sql", executionPhase = BEFORE_TEST_METHOD)
@Sql(scripts = "/clean_data_integration_test.sql", executionPhase = AFTER_TEST_METHOD)
public class JourneyRepositoryIT {
@Autowired
private JourneyRepository repository;
@Test
public void findAll_shouldFindSomething_Maybe() {
// given
// ... nothing to setup
// when
List<Journey> journeys = repository.findAll();
// then
assertThat(journeys).isNotNull();
assertThat(journeys.size()).isGreaterThanOrEqualTo(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment