X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fservice%2FExternalAccessRolesServiceImplTest.java;fp=ecomp-portal-BE-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fservice%2FExternalAccessRolesServiceImplTest.java;h=0331633c508b0eeacb88afee71c3d8e126992141;hb=8fbf2846655dbad0e19789e510c51127ad35104d;hp=0e59d643416c3ac5e4c60c05ee37f1ce837fbd89;hpb=d13dacf060ff58d36f7d8995d185d78085bfd669;p=portal.git diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java index 0e59d643..0331633c 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java @@ -82,16 +82,7 @@ import org.onap.portalapp.portal.ecomp.model.UploadRoleFunctionExtSystem; import org.onap.portalapp.portal.exceptions.InactiveApplicationException; import org.onap.portalapp.portal.exceptions.InvalidUserException; import org.onap.portalapp.portal.framework.MockitoTestSuite; -import org.onap.portalapp.portal.transport.BulkUploadRoleFunction; -import org.onap.portalapp.portal.transport.BulkUploadUserRoles; -import org.onap.portalapp.portal.transport.CentralRole; -import org.onap.portalapp.portal.transport.CentralUser; -import org.onap.portalapp.portal.transport.CentralV2Role; -import org.onap.portalapp.portal.transport.CentralizedAppRoles; -import org.onap.portalapp.portal.transport.EcompUserRoles; -import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator; -import org.onap.portalapp.portal.transport.GlobalRoleWithApplicationRoleFunction; -import org.onap.portalapp.portal.transport.LocalRole; +import org.onap.portalapp.portal.transport.*; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalapp.portal.utils.PortalConstants; @@ -820,8 +811,8 @@ public class ExternalAccessRolesServiceImplTest { globalRoles.add(globalRole); Mockito.when(dataAccessService.executeNamedQuery("getGlobalRolesOfPortal", null, null)).thenReturn(globalRoles); List expected = new ArrayList<>(); - CentralV2Role cenV2Role = new CentralV2Role(); - CentralV2Role cenV2Role2 = new CentralV2Role(); + CentralV2Role cenV2Role = new CentralV2Role.CentralV2RoleBuilder().createCentralV2Role(); + CentralV2Role cenV2Role2 = new CentralV2Role.CentralV2RoleBuilder().createCentralV2Role(); expected.add(cenV2Role); expected.add(cenV2Role2); List actual = externalAccessRolesServiceImpl.getRolesForApp(app.getUebKey()); @@ -2366,7 +2357,7 @@ public class ExternalAccessRolesServiceImplTest { @Test public void convertV2CentralRoleListToOldVerisonCentralRoleListTest() { List v2CenRoleList = new ArrayList<>(); - CentralV2Role cenV2Role = new CentralV2Role(2l, "test1"); + CentralV2Role cenV2Role = new CentralV2Role.CentralV2RoleBuilder().setId(2l).setName("test1").createCentralV2Role(); CentralV2RoleFunction CentralV2Role = new CentralV2RoleFunction("testcode", "test_name"); SortedSet setV2RoleFuncs = new TreeSet<>(); setV2RoleFuncs.add(CentralV2Role);