diff options
author | 2019-08-13 18:20:55 +0000 | |
---|---|---|
committer | 2019-08-13 18:20:55 +0000 | |
commit | 7b528d76f061793af6086943b06aedfe401ffa3d (patch) | |
tree | 287f5e5203dee89371be9eb002ba8fe37d464280 /ecomp-portal-BE-common/src/test/java | |
parent | 3e257f494571456425c7932b5f6f13035711acec (diff) | |
parent | 5e036e48759741ad72dd4878314ad9c016ac9ba6 (diff) |
Merge "EPUserUtils class fix"
Diffstat (limited to 'ecomp-portal-BE-common/src/test/java')
-rw-r--r-- | ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java index 7383330d..80ca1424 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java @@ -256,7 +256,7 @@ public class EPUserUtilsTest { PowerMockito.when(AppUtils.getSession(mockedRequest)).thenReturn(session); PowerMockito.when(SystemProperties.getProperty(Matchers.anyString())).thenReturn("12"); Mockito.when(session.getAttribute(Matchers.anyString())).thenReturn(roles); - roles=EPUserUtils.getRoles(mockedRequest); + roles= (HashMap) EPUserUtils.getRoles(mockedRequest); assertEquals(roles,expected); @@ -279,7 +279,7 @@ public class EPUserUtilsTest { Mockito.when(session.getAttribute("attr_name")).thenReturn(user); Mockito.when(user.getEPRoles()).thenReturn(role); Mockito.when(session.getAttribute("12")).thenReturn(null); - roles=EPUserUtils.getRoles(mockedRequest); + roles= (HashMap) EPUserUtils.getRoles(mockedRequest); assertEquals(roles,expected); } @@ -320,7 +320,7 @@ public class EPUserUtilsTest { Mockito.when(epRole.getChildRoles()).thenReturn(childRoles); Mockito.when(user.getEPUserApps()).thenReturn(epUserApps); Mockito.when(session.getAttribute("12")).thenReturn(null); - roles= EPUserUtils.getRoles(mockedRequest); + roles= (HashMap) EPUserUtils.getRoles(mockedRequest); assertNotNull(roles); } @@ -358,7 +358,7 @@ public class EPUserUtilsTest { Mockito.when(epRoleFunctionService.getRoleFunctions()).thenReturn(roleFunctions); Mockito.when(MenuBuilder.filterMenu(applicationMenuData, mockedRequest)).thenReturn(applicationMenuData); PowerMockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("12"); - EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, "login_method", epRoleFunctionService); + EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, epRoleFunctionService); assertNotNull(session); @@ -383,7 +383,7 @@ public class EPUserUtilsTest { Mockito.when(epRoleFunctionService.getRoleFunctions()).thenReturn(null); Mockito.when(MenuBuilder.filterMenu(applicationMenuData, mockedRequest)).thenReturn(applicationMenuData); PowerMockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("12"); - EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, "login_method", epRoleFunctionService); + EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, epRoleFunctionService); assertNotNull(session); } @@ -408,7 +408,7 @@ public class EPUserUtilsTest { Mockito.when(epRoleFunctionService.getRoleFunctions()).thenReturn(null); Mockito.when(MenuBuilder.filterMenu(applicationMenuData, mockedRequest)).thenReturn(applicationMenuData); PowerMockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("12"); - EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, "login_method", epRoleFunctionService); + EPUserUtils.setUserSession(mockedRequest, user, applicationMenuData, businessDirectMenuData, epRoleFunctionService); assertNotNull(session); |