From bd13e99e6cf3ad7833af3b597572d8e43ebc9e75 Mon Sep 17 00:00:00 2001 From: isuri Date: Wed, 31 Jan 2024 12:09:49 +0530 Subject: [PATCH] deviceOrgFix: service negative test fix --- .../organization/ServiceNegativeTest.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/organization/ServiceNegativeTest.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/organization/ServiceNegativeTest.java index 761c0aab74..3f2b125f1b 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/organization/ServiceNegativeTest.java +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/device/organization/ServiceNegativeTest.java @@ -96,32 +96,6 @@ public class ServiceNegativeTest extends BaseDeviceOrganizationTest { deviceOrganizationService.addDeviceOrganization(invalidOrganization); } - @Test(description = "This method tests Add Device Organization method under negative circumstances with invalid" + - "parent ID", - expectedExceptions = {DeviceOrganizationMgtPluginException.class}) - public void testAddDeviceOrganizationWithInvalidParentID() throws DeviceOrganizationMgtPluginException { - - DeviceOrganization deviceOrganizationOne = new DeviceOrganization(); - deviceOrganizationOne.setDeviceId(3); - deviceOrganizationOne.setParentDeviceId(30); - deviceOrganizationOne.setDeviceOrganizationMeta("Physical Relationship"); - - boolean result1 = deviceOrganizationService.addDeviceOrganization(deviceOrganizationOne); - } - - @Test(description = "This method tests Add Device Organization method under negative circumstances with invalid" + - "child ID", - expectedExceptions = {DeviceOrganizationMgtPluginException.class}) - public void testAddDeviceOrganizationWithInvalidChildID() throws DeviceOrganizationMgtPluginException { - - DeviceOrganization deviceOrganizationOne = new DeviceOrganization(); - deviceOrganizationOne.setDeviceId(30); - deviceOrganizationOne.setParentDeviceId(3); - deviceOrganizationOne.setDeviceOrganizationMeta("Physical Relationship"); - boolean result1 = deviceOrganizationService.addDeviceOrganization(deviceOrganizationOne); - - } - @Test(description = "This method tests isDeviceOrganizationExist method under negative circumstances with an organization that doesn't exist") public void testOrganizationDoesNotExist() throws DeviceOrganizationMgtPluginException { int nonExistentDeviceId = 9999; // An ID that doesn't exist -- 2.36.3