Merge branch 'master' of github.com:wso2/product-mdm

This commit is contained in:
Dulitha Wijewantha 2015-01-27 12:33:00 +05:30
commit ccd778160f
3 changed files with 17 additions and 8 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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