Added method to clear datasource field after use.

This commit is contained in:
Luke Taylor 2007-11-11 23:10:21 +00:00
parent 910e63f83c
commit 315d4a247f
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.BeforeClass;
@ -28,6 +29,11 @@ public class JdbcTokenRepositoryImplTests {
dataSource = new DriverManagerDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:tokenrepotest", "sa", "");
}
@AfterClass
public static void clearDataSource() {
dataSource = null;
}
@Before
public void populateDatabase() {
repo = new JdbcTokenRepositoryImpl();