File tree Expand file tree Collapse file tree
src/test/java/com/clevergang/dbtests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /target
21/.idea
2+ /build
Original file line number Diff line number Diff line change 1+ // this buildscript modification is required for applying spring-boot parent BOM
2+ buildscript {
3+ repositories {
4+ jcenter()
5+ }
6+
7+ dependencies {
8+ classpath(" org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE" )
9+ }
10+ }
11+
12+ apply plugin : ' spring-boot'
13+ apply plugin : ' java'
14+
15+ group = ' com.clevergang'
16+ version = ' 1.0.0'
17+ description = ' Comparison and common patterns for non-JPA SQL mapping frameworks for Java (Jooq, Spring JDBCTemplate etc.)'
18+
19+ repositories {
20+ jcenter()
21+ }
22+
23+ // We need Java8 for this project
24+ tasks. withType(JavaCompile ) {
25+ sourceCompatibility = ' 1.8'
26+ }
27+
28+
29+ dependencies {
30+ compile " org.springframework.boot:spring-boot-starter-jdbc"
31+ compile " org.springframework.boot:spring-boot-starter-jooq"
32+ compile " org.postgresql:postgresql:9.4.1211.jre7"
33+ compile " org.apache.commons:commons-lang3:3.4"
34+ compile " org.apache.commons:commons-collections4:4.1"
35+
36+ testCompile " org.springframework.boot:spring-boot-starter-test"
37+ }
38+
39+ // we want to show following test events in the log
40+ test {
41+ testLogging {
42+ events " PASSED" , " FAILED" , " SKIPPED"
43+ }
44+ }
Load diff This file was deleted.
Original file line number Diff line number Diff line change 55import org .junit .Test ;
66import org .junit .runner .RunWith ;
77import org .springframework .beans .factory .annotation .Autowired ;
8- import org .springframework .boot .test .SpringApplicationConfiguration ;
8+ import org .springframework .boot .test .context . SpringBootTest ;
99import org .springframework .test .annotation .Rollback ;
1010import org .springframework .test .context .junit4 .SpringJUnit4ClassRunner ;
1111import org .springframework .transaction .annotation .Transactional ;
1212
1313@ RunWith (SpringJUnit4ClassRunner .class )
14- @ SpringApplicationConfiguration (classes = DbTestsApplication .class )
14+ @ SpringBootTest (classes = DbTestsApplication .class )
1515@ Transactional
1616@ Rollback
1717public class JdbcTemplateScenariosTest {
1818
1919 @ Autowired
2020 private JDBCDataRepositoryImpl jdbcRepository ;
2121
22- protected Scenarios scenarios ;
22+ private Scenarios scenarios ;
2323
2424 @ Before
2525 public void setup () {
Original file line number Diff line number Diff line change 55import org .junit .Test ;
66import org .junit .runner .RunWith ;
77import org .springframework .beans .factory .annotation .Autowired ;
8- import org .springframework .boot .test .SpringApplicationConfiguration ;
8+ import org .springframework .boot .test .context . SpringBootTest ;
99import org .springframework .test .annotation .Rollback ;
10- import org .springframework .test .context .junit4 .SpringJUnit4ClassRunner ;
10+ import org .springframework .test .context .junit4 .SpringRunner ;
1111import org .springframework .transaction .annotation .Transactional ;
1212
13- @ RunWith (SpringJUnit4ClassRunner .class )
14- @ SpringApplicationConfiguration (classes = DbTestsApplication .class )
13+ @ RunWith (SpringRunner .class )
14+ @ SpringBootTest (classes = DbTestsApplication .class )
1515@ Transactional
1616@ Rollback
1717public class JooqScenariosTest {
1818
1919 @ Autowired
2020 private JooqDataRepositoryImpl jooqRepository ;
2121
22- protected Scenarios scenarios ;
22+ private Scenarios scenarios ;
2323
2424 @ Before
2525 public void setup () {
You can’t perform that action at this time.
0 commit comments