1 package test.integration;
2
3 import org.junit.After;
4 import org.junit.Before;
5
6
7
8
9
10
11 public abstract class IntegrationTestSuperClass implements TestBaseInterface {
12
13
14
15
16 private final TestBase testBase;
17
18
19
20
21 public IntegrationTestSuperClass() {
22 this.testBase = this.genTestBase();
23 }
24
25 @Override
26 @Before
27 public void setUp() throws Exception {
28 this.testBase.setUp();
29 }
30
31 @Override
32 @After
33 public void tearDown() throws Exception {
34 this.testBase.tearDown();
35 }
36
37
38
39
40
41
42 protected TestBase getTestBase() {
43 return this.testBase;
44 }
45
46
47
48
49
50
51
52 protected abstract TestBase genTestBase();
53
54 }