From e7248ca0ddc1203e52bc6ae2046d8291e2079158 Mon Sep 17 00:00:00 2001 From: Yohan Avishke Date: Thu, 19 Dec 2019 12:02:53 +0530 Subject: [PATCH 1/2] Implement device type delete method in the mock implementation --- .../DeviceManagementProviderServiceMock.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java index 6d5bf8937..5540b2c87 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java @@ -15,6 +15,23 @@ * specific language governing permissions and limitations * under the License. */ +/* + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.wso2.carbon.mdm.services.android.mocks; @@ -661,6 +678,12 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv return null; } + @Override + public boolean deleteDeviceType(String s, DeviceType deviceType) + throws DeviceManagementException { + return false; + } + @Override public DeviceConfiguration getDeviceConfiguration(Map propertyMap) throws DeviceManagementException, DeviceNotFoundException, UnauthorizedDeviceAccessException, From e3c85b27e44046f58e7c69ccc76a0a769ffddc31 Mon Sep 17 00:00:00 2001 From: Yohan Avishke Date: Fri, 3 Jan 2020 08:34:10 +0530 Subject: [PATCH 2/2] Implement device type versions delete and dis-eroll devices methods --- .../mokcs/DeviceManagementProviderServiceMock.java | 11 +++++++++++ 1 file changed, 11 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 50dd05d54..d4d00ec71 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,17 @@ import java.util.List; import java.util.Map; public class DeviceManagementProviderServiceMock implements DeviceManagementProviderService { + @Override + public boolean deleteDeviceTypeVersions(DeviceType deviceType) + throws DeviceManagementException { + return false; + } + + @Override + public void disEnrollDevices(List list) throws DeviceManagementException { + + } + @Override public List getAllDevices(String s) throws DeviceManagementException { return null;