mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
646 B
Java
32 lines
646 B
Java
/**
|
|
* Copyright (c) 2012 Todoroo Inc
|
|
*
|
|
* See the file "LICENSE" for the full license governing this code.
|
|
*/
|
|
package com.todoroo.astrid.test;
|
|
|
|
import com.todoroo.astrid.dao.Database;
|
|
|
|
import org.tasks.injection.InjectingTestCase;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
public abstract class DatabaseTestCase extends InjectingTestCase {
|
|
|
|
@Inject protected Database database;
|
|
|
|
@Override
|
|
protected void setUp() {
|
|
super.setUp();
|
|
|
|
database.close();
|
|
getContext().deleteDatabase(database.getName());
|
|
database.openForWriting();
|
|
}
|
|
|
|
@Override
|
|
protected void tearDown() {
|
|
database.close();
|
|
}
|
|
}
|