Merge branch 'master' into 'master'

Fix log issue in test cases

See merge request entgra/carbon-device-mgt!87
merge-requests/92/head
Charitha Goonetilleke 6 years ago
commit f5725325e0

@ -55,7 +55,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This is a test class for {@link ActivityProviderServiceImpl}. * This is a test class for {@link ActivityProviderServiceImpl}.
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({ "org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({ "org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.context.PrivilegedCarbonContext" }) "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.context.PrivilegedCarbonContext" })
@PrepareForTest({ DeviceMgtAPIUtils.class, PolicyManagerUtil.class, PrivilegedCarbonContext.class }) @PrepareForTest({ DeviceMgtAPIUtils.class, PolicyManagerUtil.class, PrivilegedCarbonContext.class })

@ -44,7 +44,7 @@ import java.util.List;
/** /**
* This is a test class for {@link ConfigurationServiceImpl}. * This is a test class for {@link ConfigurationServiceImpl}.
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext"}) "org.wso2.carbon.context.CarbonContext"})
@PrepareForTest({DeviceMgtAPIUtils.class, PolicyManagerUtil.class}) @PrepareForTest({DeviceMgtAPIUtils.class, PolicyManagerUtil.class})

@ -75,7 +75,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This class holds the unit tests for the class {@link DeviceAgentServiceImpl} * This class holds the unit tests for the class {@link DeviceAgentServiceImpl}
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.context.internal.CarbonContextDataHolder"}) "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.context.internal.CarbonContextDataHolder"})
@PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class, @PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class,

@ -68,7 +68,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This class includes unit tests for testing the functionality of {@link DeviceManagementServiceImpl} * This class includes unit tests for testing the functionality of {@link DeviceManagementServiceImpl}
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext"}) "org.wso2.carbon.context.CarbonContext"})
@PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class}) @PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class})

@ -48,7 +48,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This class holds the unit tests for the class {@link DeviceTypeManagementAdminService} * This class holds the unit tests for the class {@link DeviceTypeManagementAdminService}
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils"}) @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils"})
@PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class}) @PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class})
public class DeviceTypeManagementAdminServiceTest { public class DeviceTypeManagementAdminServiceTest {

@ -48,7 +48,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This class holds the unit tests for the class {@link DeviceTypeManagementService} * This class holds the unit tests for the class {@link DeviceTypeManagementService}
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils"}) @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils"})
@PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class}) @PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class})
public class DeviceTypeManagementServiceTest { public class DeviceTypeManagementServiceTest {

@ -1,6 +1,7 @@
package org.wso2.carbon.device.mgt.jaxrs.service.impl; package org.wso2.carbon.device.mgt.jaxrs.service.impl;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -15,6 +16,7 @@ import javax.ws.rs.core.Response;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
public class GeoLocationBasedServiceImplTest { public class GeoLocationBasedServiceImplTest {
private DeviceManagementProviderService deviceManagementProviderService; private DeviceManagementProviderService deviceManagementProviderService;
private PrivilegedCarbonContext context; private PrivilegedCarbonContext context;

@ -54,7 +54,7 @@ import java.util.List;
/** /**
* This is a test case for {@link GroupManagementServiceImpl}. * This is a test case for {@link GroupManagementServiceImpl}.
*/ */
@PowerMockIgnore({"javax.ws.rs.*", "javax.xml.parsers"}) @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*", "javax.xml.parsers"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.PrivilegedCarbonContext"}) "org.wso2.carbon.context.PrivilegedCarbonContext"})
@PrepareForTest({DeviceMgtAPIUtils.class, CarbonContext.class}) @PrepareForTest({DeviceMgtAPIUtils.class, CarbonContext.class})

@ -46,7 +46,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This is a test class for {@link NotificationManagementServiceImpl}. * This is a test class for {@link NotificationManagementServiceImpl}.
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext"}) "org.wso2.carbon.context.CarbonContext"})
@PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class}) @PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class})

@ -58,7 +58,7 @@ import static org.mockito.MockitoAnnotations.initMocks;
/** /**
* This is a test case for {@link UserManagementService}. * This is a test case for {@link UserManagementService}.
*/ */
@PowerMockIgnore("javax.ws.rs.*") @PowerMockIgnore({"javax.ws.rs.*", "org.apache.log4j.*"})
@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils", @SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
"org.wso2.carbon.context.CarbonContext"}) "org.wso2.carbon.context.CarbonContext"})
@PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class}) @PrepareForTest({DeviceMgtAPIUtils.class, MultitenantUtils.class, CarbonContext.class})

Loading…
Cancel
Save