adding some testcases for the mocking database operations.

revert-70aa11f8
sinthuja 7 years ago
parent b419644a22
commit 7a26fb6a93

@ -69,8 +69,8 @@ public abstract class BaseDeviceManagementTest {
@BeforeSuite
@Parameters({"datasource", "isMock"})
public void setupDataSource(@Optional("src/test/resources/config/datasource/data-source-config") String datasource,
@Optional("false") boolean isMock)
public void setupDataSource(@Optional("src/test/resources/config/datasource/mysql/data-source-config") String datasource,
@Optional("true") boolean isMock)
throws Exception {
datasourceLocation = datasource;
mock = isMock;

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.device.mgt.core.mock;
import org.mockito.Mock;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
@ -45,9 +47,13 @@ public class MockDataSource implements DataSource {
throw new SQLException("Cannot created test connection.");
} else {
if (!connections.isEmpty()) {
if (this.connectionCounter < this.connections.size()) {
Connection connection = this.connections.get(this.connectionCounter);
this.connectionCounter++;
return connection;
} else {
return new MockConnection(url);
}
}
return new MockConnection(url);
}
@ -111,4 +117,8 @@ public class MockDataSource implements DataSource {
return this.url;
}
public MockConnection getConnection(int id) {
return (MockConnection) this.connections.get(id);
}
}

@ -53,7 +53,7 @@ public class MockResultSet implements ResultSet {
private AtomicInteger integerCounter = new AtomicInteger(0);
private AtomicInteger doubleCounter = new AtomicInteger(0);
private AtomicInteger booleanCounter = new AtomicInteger(0);
private AtomicInteger timestampCounter;
private AtomicInteger timestampCounter = new AtomicInteger(0);
private boolean iterated = false;
private boolean hasData = false;

@ -141,15 +141,19 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
datasourceField.setAccessible(true);
dataSource = (MockDataSource) getDataSource();
dataSource.setConnection(new MockConnection(dataSource.getUrl()));
MockConnection connection = new MockConnection(dataSource.getUrl());
dataSource.setConnection(connection);
MockStatement mockStatement = new MockStatement();
MockResultSet resultSet = new MockResultSet();
resultSet.addInteger(1);
resultSet.addString(null);
mockStatement.addResultSet(resultSet);
connection.addMockStatement(mockStatement);
datasourceField.set(datasourceField, dataSource);
}
try {
boolean enrollmentStatus = deviceMgtService.enrollDevice(device);
@ -168,8 +172,10 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
deviceIdentifier.setId(DEVICE_ID);
deviceIdentifier.setType(DEVICE_TYPE);
boolean enrollmentStatus = deviceMgtService.isEnrolled(deviceIdentifier);
if (!isMock()) {
Assert.assertTrue(enrollmentStatus);
}
}
@Test
public void testIsEnrolledForNonExistingDevice() throws DeviceManagementException {
@ -195,13 +201,16 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testReEnrollmentofSameDeviceUnderSameUser() throws DeviceManagementException {
if (!isMock()) {
Device device = TestDataHolder.generateDummyDeviceData(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE));
boolean enrollment = deviceMgtService.enrollDevice(device);
Assert.assertTrue(enrollment);
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testReEnrollmentofSameDeviceWithOtherUser() throws DeviceManagementException {
if (!isMock()) {
EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
enrolmentInfo.setDateOfEnrolment(new Date().getTime());
@ -222,17 +231,19 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
Assert.assertFalse(retrievedDevice1.getEnrolmentInfo().getOwner().equalsIgnoreCase
(retrievedDevice2.getEnrolmentInfo().getOwner()));
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceWithOtherUser"})
public void testDisenrollment() throws DeviceManagementException {
if (!isMock()) {
Device device = TestDataHolder.generateDummyDeviceData(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE));
boolean disenrollmentStatus = deviceMgtService.disenrollDevice(new DeviceIdentifier
(device.getDeviceIdentifier(), device.getType()));
log.info(disenrollmentStatus);
Assert.assertTrue(disenrollmentStatus);
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceWithOtherUser"}, expectedExceptions =
DeviceManagementException.class)
@ -260,24 +271,30 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testDisenrollment"})
public void testDisenrollAlreadyDisEnrolledDevice() throws DeviceManagementException {
if (!isMock()) {
Device device = TestDataHolder.generateDummyDeviceData(new DeviceIdentifier(DEVICE_ID,
DEVICE_TYPE));
boolean result = deviceMgtService.disenrollDevice(new DeviceIdentifier(
device.getDeviceIdentifier(), device.getType()));
Assert.assertTrue(result);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviceCount() throws DeviceManagementException {
int count = deviceMgtService.getDeviceCount();
if (!isMock()) {
Assert.assertTrue(count > 0);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviceCountForUser() throws DeviceManagementException {
int count = deviceMgtService.getDeviceCount(TestDataHolder.OWNER);
if (!isMock()) {
Assert.assertTrue(count > 0);
}
}
@Test
public void testGetDeviceCountForNonExistingUser() throws DeviceManagementException {
@ -325,12 +342,16 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviceEnrolledTenants() throws DeviceManagementException {
List<Integer> tenants = deviceMgtService.getDeviceEnrolledTenants();
if (!isMock()) {
Assert.assertEquals(tenants.size(), 1);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDevice() throws DeviceManagementException {
public void testGetDevice() throws DeviceManagementException, NoSuchFieldException, IllegalAccessException {
MockDataSource dataSource = setDatasourceForGetDevice();
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE));
cleanupMockDatasource(dataSource);
Assert.assertTrue(device.getDeviceIdentifier().equalsIgnoreCase(DEVICE_ID));
}
@ -339,12 +360,17 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
public void testGetDeviceWithInfo() throws DeviceManagementException {
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE)
, true);
if (!isMock()) {
Assert.assertTrue(device.getDeviceInfo() != null);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviceTypeWithProps() throws DeviceManagementException {
public void testGetDeviceTypeWithProps() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
MockDataSource dataSource = setDatasourceForGetDevice();
Device device = deviceMgtService.getDeviceWithTypeProperties(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE));
cleanupMockDatasource(dataSource);
Assert.assertTrue(!device.getProperties().isEmpty());
}
@ -352,12 +378,16 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
public void testGetDeviceWithOutInfo() throws DeviceManagementException {
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE)
, false);
if (!isMock()) {
Assert.assertTrue(device.getDeviceInfo() == null);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesOfRole() throws DeviceManagementException {
public void testGetAllDevicesOfRole() throws DeviceManagementException, NoSuchFieldException, IllegalAccessException {
MockDataSource dataSource = setDatasourceForGetDevice();
List<Device> devices = deviceMgtService.getAllDevicesOfRole("admin");
cleanupMockDatasource(dataSource);
Assert.assertTrue(devices.size() > 0);
}
@ -394,8 +424,10 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
public void testDeviceByOwner() throws DeviceManagementException {
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID,
DEVICE_TYPE), "admin", true);
if (!isMock()) {
Assert.assertTrue(device != null);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testDeviceByOwnerAndNonExistentDeviceID() throws DeviceManagementException {
@ -443,13 +475,10 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
addDeviceInformation(initialDevice);
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID,
DEVICE_TYPE), yesterday());
if (isMock()) {
if (dataSource != null) {
dataSource.reset();
}
}
cleanupMockDatasource(dataSource);
if (!isMock()) {
Assert.assertTrue(device != null);
}
}
private MockResultSet getMockGetDeviceResult() {
@ -458,7 +487,7 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
resultSet.addString("Test");
resultSet.addString(null);
resultSet.addString(DEVICE_TYPE);
resultSet.addString(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE).toString());
resultSet.addString(DEVICE_ID);
resultSet.addInteger(0);
resultSet.addString("admin");
resultSet.addString("BYOD");
@ -495,10 +524,12 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testDeviceByDate"})
public void testDeviceByDateAndOwner() throws DeviceManagementException {
if (!isMock()) {
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID,
DEVICE_TYPE), "admin", yesterday(), true);
Assert.assertTrue(device != null);
}
}
@Test
public void testGetAvaliableDeviceTypes() throws DeviceManagementException {
@ -509,16 +540,48 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevices() throws DeviceManagementException {
public void testGetAllDevices() throws DeviceManagementException, NoSuchFieldException, IllegalAccessException {
MockDataSource dataSource = setDatasourceForGetDevice();
List<Device> devices = deviceMgtService.getAllDevices();
cleanupMockDatasource(dataSource);
Assert.assertTrue(!devices.isEmpty());
}
private MockDataSource setDatasourceForGetDevice() throws IllegalAccessException, NoSuchFieldException {
MockDataSource dataSource = null;
if (isMock()) {
Field datasourceField = DeviceManagementDAOFactory.class.getDeclaredField("dataSource");
datasourceField.setAccessible(true);
dataSource = (MockDataSource) getDataSource();
//connection used for first get device operation.
MockConnection connection = new MockConnection(dataSource.getUrl());
dataSource.setConnection(connection);
MockStatement mockStatement = new MockStatement();
mockStatement.addResultSet(getMockGetDeviceResult());
connection.addMockStatement(mockStatement);
datasourceField.set(datasourceField, dataSource);
}
return dataSource;
}
private void cleanupMockDatasource(MockDataSource dataSource) {
if (isMock()) {
if (dataSource != null) {
dataSource.reset();
}
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesPaginated() throws DeviceManagementException {
public void testGetAllDevicesPaginated() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
request.setOwnerRole("admin");
MockDataSource dataSource = setDatasourceForGetDevice();
PaginationResult result = deviceMgtService.getAllDevices(request);
cleanupMockDatasource(dataSource);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
@ -530,60 +593,93 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesByName() throws DeviceManagementException {
public void testGetAllDevicesByName() throws DeviceManagementException, NoSuchFieldException, IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
request.setDeviceName(DEVICE_TYPE + "-" + DEVICE_ID);
MockDataSource dataSource = setDatasourceForGetDevice();
if (dataSource != null) {
setMockDeviceCount(dataSource.getConnection(0));
}
PaginationResult result = deviceMgtService.getDevicesByName(request);
cleanupMockDatasource(dataSource);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesByNameAndType() throws DeviceManagementException {
public void testGetAllDevicesByNameAndType() throws DeviceManagementException, NoSuchFieldException, IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
request.setDeviceName(DEVICE_TYPE + "-" + DEVICE_ID);
request.setDeviceType(DEVICE_TYPE);
MockDataSource dataSource = setDatasourceForGetDevice();
List<Device> devices = deviceMgtService.getDevicesByNameAndType(request, true);
cleanupMockDatasource(dataSource);
Assert.assertTrue(!devices.isEmpty());
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesByStatus() throws DeviceManagementException {
public void testGetAllDevicesByStatus() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
request.setStatus(EnrolmentInfo.Status.ACTIVE.toString());
MockDataSource dataSource = setDatasourceForGetDevice();
if (dataSource != null) {
setMockDeviceCount(dataSource.getConnection(0));
}
PaginationResult result = deviceMgtService.getDevicesByStatus(request, true);
cleanupMockDatasource(dataSource);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
private void setMockDeviceCount(MockConnection connection) {
MockStatement statement = new MockStatement();
connection.addMockStatement(statement);
MockResultSet resultSet = new MockResultSet();
resultSet.addInteger(1);
statement.addResultSet(resultSet);
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDevicesOfTypePaginated() throws DeviceManagementException {
if (!isMock()) {
PaginationRequest request = new PaginationRequest(0, 100);
request.setDeviceType(DEVICE_TYPE);
PaginationResult result = deviceMgtService.getDevicesByType(request);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesWithInfo() throws DeviceManagementException {
public void testGetAllDevicesWithInfo() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
MockDataSource dataSource = setDatasourceForGetDevice();
List<Device> devices = deviceMgtService.getAllDevices(true);
cleanupMockDatasource(dataSource);
Assert.assertTrue(!devices.isEmpty());
Assert.assertTrue(devices.get(0).getDeviceInfo() != null);
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetAllDevicesWithInfoPaginated() throws DeviceManagementException {
public void testGetAllDevicesWithInfoPaginated() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
MockDataSource dataSource = setDatasourceForGetDevice();
if (dataSource != null) {
setMockDeviceCount(dataSource.getConnection(0));
}
PaginationResult result = deviceMgtService.getAllDevices(request, true);
cleanupMockDatasource(dataSource);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetTenantedDevice() throws DeviceManagementException {
PaginationRequest request = new PaginationRequest(0, 100);
HashMap<Integer, Device> deviceMap = deviceMgtService.getTenantedDevice(new
DeviceIdentifier
(DEVICE_ID, DEVICE_TYPE));
if (!isMock()) {
Assert.assertTrue(!deviceMap.isEmpty());
}
}
@Test
public void testGetLicense() throws DeviceManagementException {
@ -606,30 +702,38 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviesOfUserWhileUserNull() throws DeviceManagementException {
if (!isMock()) {
List<Device> devices = deviceMgtService.getDevicesOfUser("admin");
Assert.assertTrue(!devices.isEmpty());
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDevieByStatus() throws DeviceManagementException {
if (!isMock()) {
Device device = deviceMgtService.getDevice(new DeviceIdentifier(DEVICE_ID,
DEVICE_TYPE), EnrolmentInfo.Status.ACTIVE);
Assert.assertTrue(device != null);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDevieByDate() throws DeviceManagementException {
if (!isMock()) {
List<Device> devices = deviceMgtService.getDevices(yesterday());
Assert.assertTrue(!devices.isEmpty());
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviesOfUserPaginated() throws DeviceManagementException {
if (!isMock()) {
PaginationRequest request = new PaginationRequest(0, 100);
request.setOwner("admin");
PaginationResult result = deviceMgtService.getDevicesOfUser(request, true);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"}, expectedExceptions =
DeviceManagementException.class)
@ -640,11 +744,13 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviesByOwnership() throws DeviceManagementException {
if (!isMock()) {
PaginationRequest request = new PaginationRequest(0, 100);
request.setOwnership(EnrolmentInfo.OwnerShip.BYOD.toString());
PaginationResult result = deviceMgtService.getDevicesByOwnership(request);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testSetOwnership() throws DeviceManagementException {
@ -667,25 +773,35 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
}
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviesByStatus() throws DeviceManagementException {
public void testGetDeviesByStatus() throws DeviceManagementException, NoSuchFieldException,
IllegalAccessException {
PaginationRequest request = new PaginationRequest(0, 100);
request.setStatus("ACTIVE");
MockDataSource dataSource = setDatasourceForGetDevice();
if (dataSource != null) {
setMockDeviceCount(dataSource.getConnection(0));
}
PaginationResult result = deviceMgtService.getDevicesByStatus(request);
cleanupMockDatasource(dataSource);
Assert.assertTrue(result.getRecordsTotal() > 0);
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testUpdateDevicesStatus() throws DeviceManagementException {
if (!isMock()) {
boolean status = deviceMgtService.setStatus("user1", EnrolmentInfo.Status.REMOVED);
Assert.assertTrue(status);
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testUpdateDevicesStatusWithDeviceID() throws DeviceManagementException {
if (!isMock()) {
boolean status = deviceMgtService.setStatus(new DeviceIdentifier(DEVICE_ID, DEVICE_TYPE), "user1",
EnrolmentInfo.Status.ACTIVE);
Assert.assertTrue(status);
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testUpdateDevicesStatusOfNonExistingUser() throws DeviceManagementException {
@ -695,10 +811,12 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@Test(dependsOnMethods = {"testSuccessfulDeviceEnrollment"})
public void testGetDeviesOfUserAndDeviceType() throws DeviceManagementException {
if (!isMock()) {
List<Device> devices = deviceMgtService.getDevicesOfUser("admin", DEVICE_TYPE, true);
Assert.assertTrue(!devices.isEmpty() && devices.get(0).getType().equalsIgnoreCase
(DEVICE_TYPE) && devices.get(0).getDeviceInfo() != null);
}
}
@Test
public void testSendRegistrationEmailSuccessFlow() throws ConfigurationManagementException, DeviceManagementException {

@ -38,9 +38,9 @@
</test>
<!--TODO: Uncomment below once the tests are passing-->
<!--<test name="Service Unit Tests" preserve-order="true">-->
<!--<classes>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>-->
<test name="Service Unit Tests" preserve-order="true">
<classes>
<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>
<!--<class name="org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.operation.OperationManagementTests"/>-->
@ -57,6 +57,6 @@
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchManagementServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.ProcessorImplTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchMgtUtilTest"/>-->
<!--</classes>-->
<!--</test>-->
</classes>
</test>
</suite>

@ -38,9 +38,9 @@
</test>
<!--TODO: Uncomment below once the tests are passing-->
<!--<test name="Service Unit Tests" preserve-order="true">-->
<!--<classes>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>-->
<test name="Service Unit Tests" preserve-order="true">
<classes>
<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>
<!--<class name="org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.operation.OperationManagementTests"/>-->
@ -57,6 +57,6 @@
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchManagementServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.ProcessorImplTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchMgtUtilTest"/>-->
<!--</classes>-->
<!--</test>-->
</classes>
</test>
</suite>

@ -38,9 +38,9 @@
</test>
<!--TODO: Uncomment below once the tests are passing-->
<!--<test name="Service Unit Tests" preserve-order="true">-->
<!--<classes>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>-->
<test name="Service Unit Tests" preserve-order="true">
<classes>
<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>
<!--<class name="org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.operation.OperationManagementTests"/>-->
@ -57,6 +57,6 @@
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchManagementServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.ProcessorImplTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchMgtUtilTest"/>-->
<!--</classes>-->
<!--</test>-->
</classes>
</test>
</suite>

@ -38,9 +38,9 @@
</test>
<!--TODO: Uncomment below once the tests are passing-->
<!--<test name="Service Unit Tests" preserve-order="true">-->
<!--<classes>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>-->
<test name="Service Unit Tests" preserve-order="true">
<classes>
<class name="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceTest"/>
<!--<class name="org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.operation.OperationManagementTests"/>-->
@ -57,6 +57,6 @@
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchManagementServiceTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.ProcessorImplTest"/>-->
<!--<class name="org.wso2.carbon.device.mgt.core.search.SearchMgtUtilTest"/>-->
<!--</classes>-->
<!--</test>-->
</classes>
</test>
</suite>

Loading…
Cancel
Save