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%2FUserRolesCommonServiceImplTest.java;h=785522d4daa38f226a2bc87a486c5e81ef4ab75c;hb=8fbf2846655dbad0e19789e510c51127ad35104d;hp=4d07c7928621eaf013c3c3d0b93bf4bbbc70fb29;hpb=a3a04c5887779e9ca8024a3e87ece109b8d9b0c1;p=portal.git diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java index 4d07c792..785522d4 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java @@ -82,18 +82,7 @@ import org.onap.portalapp.portal.domain.EPUserAppRoles; import org.onap.portalapp.portal.domain.EPUserAppRolesRequest; import org.onap.portalapp.portal.domain.EPUserAppRolesRequestDetail; import org.onap.portalapp.portal.domain.ExternalSystemAccess; -import org.onap.portalapp.portal.transport.AppWithRolesForUser; -import org.onap.portalapp.portal.transport.CentralV2Role; -import org.onap.portalapp.portal.transport.EPUserAppCurrentRoles; -import org.onap.portalapp.portal.transport.EcompUserAppRoles; -import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator; -import org.onap.portalapp.portal.transport.FieldsValidator; -import org.onap.portalapp.portal.transport.FunctionalMenuItem; -import org.onap.portalapp.portal.transport.FunctionalMenuRole; -import org.onap.portalapp.portal.transport.RemoteRole; -import org.onap.portalapp.portal.transport.RemoteUserWithRoles; -import org.onap.portalapp.portal.transport.RoleInAppForUser; -import org.onap.portalapp.portal.transport.UserApplicationRoles; +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; @@ -204,10 +193,14 @@ public class UserRolesCommonServiceImplTest { Mockito.when(epAppCommonServiceImpl.getApp(mockApp.getId())).thenReturn(mockApp); List mockRoleInAppForUserList = getMockedRoleInAppUserList(); List mockCenV2Role = new ArrayList<>(); - CentralV2Role cenV2Role = new CentralV2Role(1l, null, null, null, null, null, "test1", true, null, - new TreeSet<>(), new TreeSet<>(), new TreeSet<>()); - CentralV2Role cenV2Role2 = new CentralV2Role(16l, null, null, null, null, null, "test2", true, null, - new TreeSet<>(), new TreeSet<>(), new TreeSet<>()); + CentralV2Role cenV2Role = new CentralV2Role.CentralV2RoleBuilder().setId(1l).setCreated(null).setModified(null) + .setCreatedId(null).setModifiedId(null).setRowNum(null).setName("test1").setActive(true) + .setPriority(null).setRoleFunctions(new TreeSet<>()).setChildRoles(new TreeSet<>()) + .setParentRoles(new TreeSet<>()).createCentralV2Role(); + CentralV2Role cenV2Role2 = new CentralV2Role.CentralV2RoleBuilder().setId(16l).setCreated(null) + .setModified(null).setCreatedId(null).setModifiedId(null).setRowNum(null).setName("test2") + .setActive(true).setPriority(null).setRoleFunctions(new TreeSet<>()).setChildRoles(new TreeSet<>()) + .setParentRoles(new TreeSet<>()).createCentralV2Role(); mockCenV2Role.add(cenV2Role); mockCenV2Role.add(cenV2Role2); Mockito.when(externalAccessRolesServiceImpl.getRolesForApp(mockApp.getUebKey())).thenReturn(mockCenV2Role);