Adding proper dependency exclusions to poms, making MobileFeatureDAOTestSuite use jdbc pooling instead of dbcp and making testdbconfig.xml to be compliant with platform naming standards

revert-dabc3590
prabathabey 10 years ago
parent 3017d53432
commit 733ae8ed10

@ -90,8 +90,8 @@
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
@ -111,16 +111,20 @@
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.impl</artifactId>
<artifactId>org.wso2.carbon.apimgt.api</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.core</artifactId>
<artifactId>org.wso2.carbon.apimgt.impl</artifactId>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.wso2</groupId>
<artifactId>jdbc-pool</artifactId>
</dependency>
</dependencies>
</project>

@ -22,69 +22,69 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "DBType")
@XmlRootElement(name = "Type")
public class TestDBConfiguration {
private String connectionUrl;
private String driverClass;
private String userName;
private String pwd;
private String connectionURL;
private String driverClassName;
private String username;
private String password;
@Override public String toString() {
return "TestDBConfiguration{" +
"connectionUrl='" + connectionUrl + '\'' +
", driverClass='" + driverClass + '\'' +
", userName='" + userName + '\'' +
", pwd='" + pwd + '\'' +
", dbType='" + dbType + '\'' +
return "TestDataSourceConfiguration{" +
"ConnectionURL='" + connectionURL + '\'' +
", DriverClassName='" + driverClassName + '\'' +
", Username='" + username + '\'' +
", Password='" + password + '\'' +
", Type='" + dbType + '\'' +
'}';
}
private String dbType;
@XmlElement(name = "connectionurl", nillable = false)
public String getConnectionUrl() {
return connectionUrl;
@XmlElement(name = "ConnectionURL", nillable = false)
public String getConnectionURL() {
return connectionURL;
}
public void setConnectionUrl(String connectionUrl) {
this.connectionUrl = connectionUrl;
public void setConnectionURL(String connectionURL) {
this.connectionURL = connectionURL;
}
@XmlElement(name = "driverclass", nillable = false)
public String getDriverClass() {
return driverClass;
@XmlElement(name = "DriverClassName", nillable = false)
public String getDriverClassName() {
return driverClassName;
}
public void setDriverClass(String driverClass) {
this.driverClass = driverClass;
public void setDriverClassName(String driverClassName) {
this.driverClassName = driverClassName;
}
@XmlElement(name = "userName", nillable = false)
public String getUserName() {
return userName;
@XmlElement(name = "Username", nillable = false)
public String getUsername() {
return username;
}
public void setUserName(String userName) {
this.userName = userName;
public void setUsername(String username) {
this.username = username;
}
@XmlElement(name = "pwd", nillable = false)
public String getPwd() {
return pwd;
@XmlElement(name = "Password", nillable = false)
public String getPassword() {
return password;
}
public void setPwd(String pwd) {
this.pwd = pwd;
public void setPassword(String password) {
this.password = password;
}
@XmlAttribute(name = "typeName")
public String getDbType() {
@XmlAttribute(name = "name")
public String getType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
public void setType(String type) {
this.dbType = type;
}
}

@ -18,9 +18,9 @@
package org.wso2.carbon.device.mgt.mobile.impl.dao;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.jdbc.pool.PoolProperties;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Parameters;
@ -36,6 +36,7 @@ import org.wso2.carbon.device.mgt.mobile.impl.common.TestDBConfiguration;
import org.wso2.carbon.device.mgt.mobile.impl.common.TestDBConfigurations;
import org.wso2.carbon.device.mgt.mobile.util.MobileDeviceManagementUtil;
import javax.sql.DataSource;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
@ -46,237 +47,237 @@ import java.util.List;
public class MobileFeatureDAOTestSuite {
private static final Log log = LogFactory.getLog(MobileFeatureDAOTestSuite.class);
public static final String MBL_FEATURE_NAME = "Camera";
private static final String MBL_FEATURE_CODE = "500A";
public static final String MBL_FEATURE_DESCRIPTION = "Camera enable or disable";
public static final String MBL_FEATURE_UPDATED_CODE = "501B";
private TestDBConfiguration testDBConfiguration;
private Connection conn = null;
private Statement stmt = null;
private MobileFeatureDAOImpl mblFeatureDAO;
private int mblFeatureId;
private static final Log log = LogFactory.getLog(MobileFeatureDAOTestSuite.class);
public static final String MBL_FEATURE_NAME = "Camera";
private static final String MBL_FEATURE_CODE = "500A";
public static final String MBL_FEATURE_DESCRIPTION = "Camera enable or disable";
public static final String MBL_FEATURE_UPDATED_CODE = "501B";
private TestDBConfiguration testDBConfiguration;
private Connection conn = null;
private Statement stmt = null;
private MobileFeatureDAOImpl mblFeatureDAO;
private int mblFeatureId;
@BeforeClass
@Parameters("dbType")
public void setUpDB(String dbTypeStr) throws Exception {
@BeforeClass
@Parameters("dbType")
public void setUpDB(String dbTypeStr) throws Exception {
DBTypes dbType = DBTypes.valueOf(dbTypeStr);
testDBConfiguration = getTestDBConfiguration(dbType);
DBTypes dbType = DBTypes.valueOf(dbTypeStr);
testDBConfiguration = getTestDBConfiguration(dbType);
switch (dbType) {
case H2:
createH2DB(testDBConfiguration);
BasicDataSource testDataSource = new BasicDataSource();
testDataSource.setDriverClassName(testDBConfiguration.getDriverClass());
testDataSource.setUrl(testDBConfiguration.getConnectionUrl());
testDataSource.setUsername(testDBConfiguration.getUserName());
testDataSource.setPassword(testDBConfiguration.getPwd());
mblFeatureDAO = new MobileFeatureDAOImpl(testDataSource);
default:
}
}
switch (dbType) {
case H2:
createH2DB(testDBConfiguration);
DataSource testDataSource = new org.apache.tomcat.jdbc.pool.DataSource();
PoolProperties properties = new PoolProperties();
properties.setUrl(testDBConfiguration.getConnectionURL());
properties.setDriverClassName(testDBConfiguration.getDriverClassName());
properties.setUsername(testDBConfiguration.getUsername());
properties.setPassword(testDBConfiguration.getPassword());
mblFeatureDAO = new MobileFeatureDAOImpl(testDataSource);
default:
}
}
private TestDBConfiguration getTestDBConfiguration(DBTypes dbType) throws
MobileDeviceManagementDAOException,
DeviceManagementException {
private TestDBConfiguration getTestDBConfiguration(DBTypes dbType) throws
MobileDeviceManagementDAOException,
DeviceManagementException {
File deviceMgtConfig = new File("src/test/resources/testdbconfig.xml");
Document doc = null;
testDBConfiguration = null;
TestDBConfigurations testDBConfigurations = null;
File deviceMgtConfig = new File("src/test/resources/testdbconfig.xml");
Document doc = null;
testDBConfiguration = null;
TestDBConfigurations testDBConfigurations = null;
doc = MobileDeviceManagementUtil.convertToDocument(deviceMgtConfig);
JAXBContext testDBContext = null;
doc = MobileDeviceManagementUtil.convertToDocument(deviceMgtConfig);
JAXBContext testDBContext = null;
try {
testDBContext = JAXBContext.newInstance(TestDBConfigurations.class);
Unmarshaller unmarshaller = testDBContext.createUnmarshaller();
testDBConfigurations = (TestDBConfigurations) unmarshaller.unmarshal(doc);
} catch (JAXBException e) {
throw new MobileDeviceManagementDAOException("Error parsing test db configurations", e);
}
try {
testDBContext = JAXBContext.newInstance(TestDBConfigurations.class);
Unmarshaller unmarshaller = testDBContext.createUnmarshaller();
testDBConfigurations = (TestDBConfigurations) unmarshaller.unmarshal(doc);
} catch (JAXBException e) {
throw new MobileDeviceManagementDAOException("Error parsing test db configurations", e);
}
Iterator<TestDBConfiguration> itrDBConfigs =
testDBConfigurations.getDbTypesList().iterator();
while (itrDBConfigs.hasNext()) {
testDBConfiguration = itrDBConfigs.next();
if (testDBConfiguration.getDbType().equals(dbType.toString())) {
break;
}
}
Iterator<TestDBConfiguration> itrDBConfigs =
testDBConfigurations.getDbTypesList().iterator();
while (itrDBConfigs.hasNext()) {
testDBConfiguration = itrDBConfigs.next();
if (testDBConfiguration.getType().equals(dbType.toString())) {
break;
}
}
return testDBConfiguration;
}
return testDBConfiguration;
}
private void createH2DB(TestDBConfiguration testDBConf) throws Exception {
Class.forName(testDBConf.getDriverClass());
conn = DriverManager.getConnection(testDBConf.getConnectionUrl());
stmt = conn.createStatement();
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
stmt.close();
conn.close();
}
private void createH2DB(TestDBConfiguration testDBConf) throws Exception {
Class.forName(testDBConf.getDriverClassName());
conn = DriverManager.getConnection(testDBConf.getConnectionURL());
stmt = conn.createStatement();
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
stmt.close();
conn.close();
}
@Test
public void addMobileFeatureTest()
throws MobileDeviceManagementDAOException {
@Test
public void addMobileFeatureTest()
throws MobileDeviceManagementDAOException {
MobileFeature mobileFeature = new MobileFeature();
MobileFeature testMblFeature = new MobileFeature();
mobileFeature.setCode(MBL_FEATURE_CODE);
mobileFeature.setDescription(MBL_FEATURE_DESCRIPTION);
mobileFeature.setName(MBL_FEATURE_NAME);
boolean added = mblFeatureDAO.addMobileFeature(mobileFeature);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionUrl());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM MBL_FEATURE WHERE CODE = '500A'");
while (resultSet.next()) {
testMblFeature.setId(resultSet.getInt(1));
testMblFeature.setCode(resultSet.getString(2));
testMblFeature.setName(resultSet.getString(3));
testMblFeature.setDescription(resultSet.getString(4));
}
conn.close();
} catch (SQLException e) {
log.error("Error in retrieving Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in retrieving Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
mblFeatureId = testMblFeature.getId();
Assert.assertTrue(added, "MobileFeature is added");
Assert.assertEquals(MBL_FEATURE_CODE, testMblFeature.getCode(),
"MobileFeature code has persisted successfully");
Assert.assertEquals(MBL_FEATURE_NAME, testMblFeature.getName(),
"MobileFeature name has persisted successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, testMblFeature.getDescription(),
"MobileFeature description has persisted successfully");
}
MobileFeature mobileFeature = new MobileFeature();
MobileFeature testMblFeature = new MobileFeature();
mobileFeature.setCode(MBL_FEATURE_CODE);
mobileFeature.setDescription(MBL_FEATURE_DESCRIPTION);
mobileFeature.setName(MBL_FEATURE_NAME);
boolean added = mblFeatureDAO.addMobileFeature(mobileFeature);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionURL());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM MBL_FEATURE WHERE CODE = '500A'");
while (resultSet.next()) {
testMblFeature.setId(resultSet.getInt(1));
testMblFeature.setCode(resultSet.getString(2));
testMblFeature.setName(resultSet.getString(3));
testMblFeature.setDescription(resultSet.getString(4));
}
conn.close();
} catch (SQLException e) {
log.error("Error in retrieving Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in retrieving Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
mblFeatureId = testMblFeature.getId();
Assert.assertTrue(added, "MobileFeature is added");
Assert.assertEquals(MBL_FEATURE_CODE, testMblFeature.getCode(),
"MobileFeature code has persisted successfully");
Assert.assertEquals(MBL_FEATURE_NAME, testMblFeature.getName(),
"MobileFeature name has persisted successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, testMblFeature.getDescription(),
"MobileFeature description has persisted successfully");
}
@Test(dependsOnMethods = { "addMobileFeatureTest" })
public void getMobileFeatureByCodeTest()
throws MobileDeviceManagementDAOException {
@Test(dependsOnMethods = {"addMobileFeatureTest"})
public void getMobileFeatureByCodeTest()
throws MobileDeviceManagementDAOException {
MobileFeature mobileFeature = mblFeatureDAO.getMobileFeatureByCode(MBL_FEATURE_CODE);
Assert.assertEquals(MBL_FEATURE_CODE, mobileFeature.getCode(),
"MobileFeature code has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_NAME, mobileFeature.getName(),
"MobileFeature name has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, mobileFeature.getDescription(),
"MobileFeature description has retrieved successfully");
}
MobileFeature mobileFeature = mblFeatureDAO.getMobileFeatureByCode(MBL_FEATURE_CODE);
Assert.assertEquals(MBL_FEATURE_CODE, mobileFeature.getCode(),
"MobileFeature code has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_NAME, mobileFeature.getName(),
"MobileFeature name has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, mobileFeature.getDescription(),
"MobileFeature description has retrieved successfully");
}
@Test(dependsOnMethods = { "addMobileFeatureTest" })
public void deleteMobileFeatureByCodeTest()
throws MobileDeviceManagementDAOException {
boolean status = mblFeatureDAO.deleteMobileFeatureByCode(MBL_FEATURE_CODE);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionUrl());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE FROM MBL_FEATURE WHERE CODE = '500A'");
while (resultSet.next()) {
status = false;
}
conn.close();
} catch (SQLException e) {
log.error("Error in deleting Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in deleting Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(status, "MobileFeature has deleted successfully");
}
@Test(dependsOnMethods = {"addMobileFeatureTest"})
public void deleteMobileFeatureByCodeTest()
throws MobileDeviceManagementDAOException {
boolean status = mblFeatureDAO.deleteMobileFeatureByCode(MBL_FEATURE_CODE);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionURL());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE FROM MBL_FEATURE WHERE CODE = '500A'");
while (resultSet.next()) {
status = false;
}
conn.close();
} catch (SQLException e) {
log.error("Error in deleting Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in deleting Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(status, "MobileFeature has deleted successfully");
}
@Test(dependsOnMethods = { "addMobileFeatureTest" })
public void getMobileFeatureByIdTest()
throws MobileDeviceManagementDAOException {
@Test(dependsOnMethods = {"addMobileFeatureTest"})
public void getMobileFeatureByIdTest()
throws MobileDeviceManagementDAOException {
MobileFeature mobileFeature = mblFeatureDAO.getMobileFeatureById(mblFeatureId);
Assert.assertEquals(MBL_FEATURE_CODE, mobileFeature.getCode(),
"MobileFeature code has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_NAME, mobileFeature.getName(),
"MobileFeature name has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, mobileFeature.getDescription(),
"MobileFeature description has retrieved successfully");
}
MobileFeature mobileFeature = mblFeatureDAO.getMobileFeatureById(mblFeatureId);
Assert.assertEquals(MBL_FEATURE_CODE, mobileFeature.getCode(),
"MobileFeature code has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_NAME, mobileFeature.getName(),
"MobileFeature name has retrieved successfully");
Assert.assertEquals(MBL_FEATURE_DESCRIPTION, mobileFeature.getDescription(),
"MobileFeature description has retrieved successfully");
}
@Test(dependsOnMethods = { "addMobileFeatureTest" })
public void getAllMobileFeaturesTest()
throws MobileDeviceManagementDAOException {
@Test(dependsOnMethods = {"addMobileFeatureTest"})
public void getAllMobileFeaturesTest()
throws MobileDeviceManagementDAOException {
List<MobileFeature> mobileFeatures = mblFeatureDAO.getAllMobileFeatures();
Assert.assertNotNull(mobileFeatures, "MobileFeature list is not null");
Assert.assertTrue(mobileFeatures.size() > 0, "MobileFeature list has 1 MobileFeature");
}
List<MobileFeature> mobileFeatures = mblFeatureDAO.getAllMobileFeatures();
Assert.assertNotNull(mobileFeatures, "MobileFeature list is not null");
Assert.assertTrue(mobileFeatures.size() > 0, "MobileFeature list has 1 MobileFeature");
}
@Test(dependsOnMethods = { "addMobileFeatureTest" })
public void deleteMobileFeatureByIdTest()
throws MobileDeviceManagementDAOException {
boolean status = mblFeatureDAO.deleteMobileFeatureById(mblFeatureId);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionUrl());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE FROM MBL_FEATURE WHERE FEATURE_ID = " +
mblFeatureId);
while (resultSet.next()) {
status = false;
}
conn.close();
} catch (SQLException e) {
log.error("Error in deleting Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in deleting Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(status, "MobileFeature has deleted successfully");
}
@Test(dependsOnMethods = {"addMobileFeatureTest"})
public void deleteMobileFeatureByIdTest()
throws MobileDeviceManagementDAOException {
boolean status = mblFeatureDAO.deleteMobileFeatureById(mblFeatureId);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionURL());
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE FROM MBL_FEATURE WHERE FEATURE_ID = " +
mblFeatureId);
while (resultSet.next()) {
status = false;
}
conn.close();
} catch (SQLException e) {
log.error("Error in deleting Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in deleting Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(status, "MobileFeature has deleted successfully");
}
@Test(dependsOnMethods = { "deleteMobileFeatureByCodeTest", "addMobileFeatureTest" })
public void updateMobileFeatureTest()
throws MobileDeviceManagementDAOException {
@Test(dependsOnMethods = {"deleteMobileFeatureByCodeTest", "addMobileFeatureTest"})
public void updateMobileFeatureTest()
throws MobileDeviceManagementDAOException {
MobileFeature mobileFeature = new MobileFeature();
MobileFeature testMblFeature = new MobileFeature();
mobileFeature.setCode(MBL_FEATURE_UPDATED_CODE);
mobileFeature.setDescription(MBL_FEATURE_DESCRIPTION);
mobileFeature.setName(MBL_FEATURE_NAME);
mobileFeature.setId(mblFeatureId);
boolean updated = mblFeatureDAO.updateMobileFeature(mobileFeature);
try {
conn = DriverManager.getConnection(testDBConfiguration.getConnectionUrl());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM MBL_FEATURE WHERE CODE = '" +
MBL_FEATURE_UPDATED_CODE + "'");
while (resultSet.next()) {
testMblFeature.setId(resultSet.getInt(1));
testMblFeature.setCode(resultSet.getString(2));
testMblFeature.setName(resultSet.getString(3));
testMblFeature.setDescription(resultSet.getString(4));
}
conn.close();
} catch (SQLException e) {
log.error("Error in updating Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in updating Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(updated, "MobileFeature has updated");
Assert.assertEquals(MBL_FEATURE_UPDATED_CODE, testMblFeature.getCode(),
"MobileFeature data has updated successfully");
}
MobileFeature mobileFeature = new MobileFeature();
MobileFeature testMblFeature = new MobileFeature();
mobileFeature.setCode(MBL_FEATURE_UPDATED_CODE);
mobileFeature.setDescription(MBL_FEATURE_DESCRIPTION);
mobileFeature.setName(MBL_FEATURE_NAME);
mobileFeature.setId(mblFeatureId);
boolean updated = mblFeatureDAO.updateMobileFeature(mobileFeature);
try {
conn = DriverManager.getConnection(testDBConfiguration.getDriverClassName());
stmt = conn.createStatement();
ResultSet resultSet = stmt
.executeQuery(
"SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM MBL_FEATURE WHERE CODE = '" +
MBL_FEATURE_UPDATED_CODE + "'");
while (resultSet.next()) {
testMblFeature.setId(resultSet.getInt(1));
testMblFeature.setCode(resultSet.getString(2));
testMblFeature.setName(resultSet.getString(3));
testMblFeature.setDescription(resultSet.getString(4));
}
conn.close();
} catch (SQLException e) {
log.error("Error in updating Mobile Feature data ", e);
throw new MobileDeviceManagementDAOException("Error in updating Mobile Feature data ",
e);
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}
Assert.assertTrue(updated, "MobileFeature has updated");
Assert.assertEquals(MBL_FEATURE_UPDATED_CODE, testMblFeature.getCode(),
"MobileFeature data has updated successfully");
}
}

@ -14,11 +14,11 @@
~ under the License.
-->
<DeviceMgtTestDBConfigurations>
<DBType typeName="H2">
<connectionurl>jdbc:h2:mem:cdm-mobile-test-db;DB_CLOSE_DELAY=-1</connectionurl>
<driverclass>org.h2.Driver</driverclass>
<userName></userName>
<pwd></pwd>
</DBType>
</DeviceMgtTestDBConfigurations>
<TestDataSourceConfigurations>
<Type name="H2">
<ConnectionURL>jdbc:h2:mem:cdm-mobile-test-db;DB_CLOSE_DELAY=-1</ConnectionURL>
<DriverClassName>org.h2.Driver</DriverClassName>
<Username></Username>
<Password></Password>
</Type>
</TestDataSourceConfigurations>

@ -42,7 +42,6 @@
<module>product</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
@ -75,7 +74,6 @@
<version>${stub.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.core</artifactId>
@ -96,6 +94,20 @@
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId>
<version>${carbon.kernel.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.log4j.wso2</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.bootstrap</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
@ -125,7 +137,6 @@
<version>${cdm.core.version}</version>
</dependency>
<!--Osgi dependencies-->
<dependency>
<groupId>org.eclipse.osgi</groupId>
@ -137,21 +148,142 @@
<artifactId>org.eclipse.equinox.common</artifactId>
<version>${eclipse.equinox.common.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
</exclusion>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
<version>${carbon.kernel.version}</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle.wso2</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.api</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.queuing</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.base</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2.wso2</groupId>
<artifactId>axis2</artifactId>
</exclusion>
<exclusion>
<groupId>org.igniterealtime.smack.wso2</groupId>
<artifactId>smack</artifactId>
</exclusion>
<exclusion>
<groupId>org.igniterealtime.smack.wso2</groupId>
<artifactId>smackx</artifactId>
</exclusion>
<exclusion>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
</exclusion>
<exclusion>
<groupId>commons-fileupload.wso2</groupId>
<artifactId>commons-fileupload</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ant.wso2</groupId>
<artifactId>ant</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ant.wso2</groupId>
<artifactId>ant</artifactId>
</exclusion>
<exclusion>
<groupId>commons-httpclient.wso2</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.equinox</groupId>
<artifactId>javax.servlet</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.registry.api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.core</artifactId>
<version>${carbon.kernel.version}</version>
<exclusions>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.registry.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.core</artifactId>
</exclusion>
<exclusion>
<groupId>com.hazelcast.wso2</groupId>
<artifactId>hazelcast</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle.wso2</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina-ha</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents.wso2</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.neethi.wso2</groupId>
<artifactId>neethi</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.axis2.wso2</groupId>
<artifactId>axis2</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections.wso2</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.http.helper</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>javax.cache.wso2</artifactId>
</exclusion>
<exclusion>
<groupId>wsdl4j.wso2</groupId>
<artifactId>wsdl4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
@ -177,11 +309,134 @@
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.core</artifactId>
<version>${apim.version}</version>
<exclusions>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.mediation.initializer</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.api</artifactId>
<version>${apim.version}</version>
<exclusions>
<exclusion>
<groupId>com.googlecode.json-simple.wso2</groupId>
<artifactId>json-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.impl</artifactId>
<version>${apim.version}</version>
<exclusions>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.mediation.initializer</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.woden.wso2</groupId>
<artifactId>woden</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.governance.api</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.registry.ws.client</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.identity.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.identity.oauth</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.keymgt.client</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.rest.api.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.json.wso2</groupId>
<artifactId>json</artifactId>
</exclusion>
<exclusion>
<groupId>com.h2database.wso2</groupId>
<artifactId>h2-database-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.handlers.security.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.mgt.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.um.ws.api</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.mediation.dependency.mgt</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.mediation.registry</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.event.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.sequences.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.mediation.security.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.registry.indexing</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.apimgt.keymgt.stub</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.securevault</artifactId>
</exclusion>
<exclusion>
<groupId>com.googlecode.json-simple.wso2</groupId>
<artifactId>json-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.wso2</groupId>
@ -198,7 +453,11 @@
<artifactId>org.wso2.carbon.tomcat</artifactId>
<version>${carbon.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.wso2</groupId>
<artifactId>jdbc-pool</artifactId>
<version>${tomcat.jdbc.pooling.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -240,8 +499,9 @@
<eclipse.osgi.version>3.8.1.v20120830-144521</eclipse.osgi.version>
<orbit.version.h2.engine>1.2.140.wso2v3</orbit.version.h2.engine>
<apim.version>1.2.1</apim.version>
<apim.version>4.3.0-SNAPSHOT</apim.version>
<orbit.version.tomcat>7.0.52.wso2v5</orbit.version.tomcat>
<tomcat.jdbc.pooling.version>7.0.34.wso2v2</tomcat.jdbc.pooling.version>
</properties>

Loading…
Cancel
Save