Unit test code changes

revert-dabc3590
harshanL 10 years ago
parent c4b255b751
commit 84b40f802f

@ -124,5 +124,10 @@
<groupId>org.apache.tomcat.wso2</groupId>
<artifactId>jdbc-pool</artifactId>
</dependency>
<dependency>
<groupId>com.h2database.wso2</groupId>
<artifactId>h2-database-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

@ -22,12 +22,12 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
@XmlRootElement(name = "DeviceMgtTestDBConfigurations")
@XmlRootElement(name = "TestDataSourceConfigurations")
public class TestDBConfigurations {
private List<TestDBConfiguration> dbTypesList;
@XmlElement(name = "DBType")
@XmlElement(name = "Type")
public List<TestDBConfiguration> getDbTypesList() {
return dbTypesList;
}

@ -112,12 +112,16 @@ public class MobileFeatureDAOTestSuite {
}
private void createH2DB(TestDBConfiguration testDBConf) throws Exception {
try {
Class.forName(testDBConf.getDriverClassName());
conn = DriverManager.getConnection(testDBConf.getConnectionURL());
stmt = conn.createStatement();
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
} finally {
stmt.close();
conn.close();
TestUtils.cleanupResources(conn, stmt, null);
}
}
@Test

Loading…
Cancel
Save