Commit d83602b8 authored by Administrator's avatar Administrator

Removes database dependencies in DatabaseQueryUnitTest

DatabaseQueryUnitTest mocks the database and there is no need to create
a testing database. Therefore, the TestUtils method calls to initialize
and clear the testing database where removed.
parent 63347867
...@@ -30,14 +30,11 @@ public abstract class DatabaseQueryUnitTest { ...@@ -30,14 +30,11 @@ public abstract class DatabaseQueryUnitTest {
@BeforeClass @BeforeClass
public static void setUpBeforeClass() public static void setUpBeforeClass()
throws Exception { throws Exception {
TestUtils.clearTestDatabase();
TestUtils.clearContextBuilder(); TestUtils.clearContextBuilder();
} }
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
TestUtils.initTestDatabase();
datasource = createMock(DataSource.class); datasource = createMock(DataSource.class);
connection = createMock(Connection.class); connection = createMock(Connection.class);
statement = createNiceMock(PreparedStatement.class); statement = createNiceMock(PreparedStatement.class);
...@@ -70,7 +67,6 @@ public abstract class DatabaseQueryUnitTest { ...@@ -70,7 +67,6 @@ public abstract class DatabaseQueryUnitTest {
@After @After
public void tearDown() throws Exception { public void tearDown() throws Exception {
TestUtils.clearTestDatabase();
TestUtils.clearContextBuilder(); TestUtils.clearContextBuilder();
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment