From 3238655c2c2a7cbf7df7e5b293385609491e45c5 Mon Sep 17 00:00:00 2001 From: Pahansith Gunathilake Date: Wed, 29 Jan 2020 11:57:07 +0000 Subject: [PATCH] Add tests - device type filtering and limit results in device types retrieve endpoint --- .../mokcs/DeviceManagementProviderServiceMock.java | 7 +++++++ .../core/mokcs/PolicyManagerServiceMock.java | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java index f8978144b..bb3a73a99 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/DeviceManagementProviderServiceMock.java @@ -78,6 +78,7 @@ import java.util.List; import java.util.Map; public class DeviceManagementProviderServiceMock implements DeviceManagementProviderService { + @Override public List getAllDevices(String s) throws DeviceManagementException { return null; @@ -613,6 +614,12 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return null; } + @Override + public List getDeviceTypes(PaginationRequest paginationRequest) + throws DeviceManagementException { + return null; + } + @Override public List getDeviceLocationInfo(DeviceIdentifier deviceIdentifier, long l, long l1) throws DeviceManagementException { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/PolicyManagerServiceMock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/PolicyManagerServiceMock.java index 36283e5d3..cf406ed12 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/PolicyManagerServiceMock.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.core/src/test/java/org/wso2/carbon/device/mgt/mobile/android/core/mokcs/PolicyManagerServiceMock.java @@ -19,6 +19,8 @@ package org.wso2.carbon.device.mgt.mobile.android.core.mokcs; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.Feature; +import org.wso2.carbon.device.mgt.common.PaginationRequest; +import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.policy.mgt.Policy; import org.wso2.carbon.device.mgt.common.policy.mgt.Profile; import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature; @@ -139,4 +141,16 @@ public class PolicyManagerServiceMock implements PolicyManagerService { public boolean isCompliant(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { return false; } + + @Override + public PaginationResult getPolicyCompliance(PaginationRequest paginationRequest, String s, + boolean b, boolean b1, String s1, String s2) + throws PolicyComplianceException { + return null; + } + + @Override + public List getNoneComplianceFeatures(int i) throws PolicyComplianceException { + return null; + } }