summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common/src/test')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java4
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/util/EPUserUtilsTest.java12
2 files changed, 7 insertions, 9 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java
index b1816ec6..5d323012 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java
@@ -48,7 +48,6 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.poi.ss.formula.functions.T;
import org.json.simple.JSONObject;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
@@ -56,7 +55,6 @@ import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.onap.portalapp.portal.controller.SchedulerController;
import org.onap.portalapp.portal.core.MockEPUser;
import org.onap.portalapp.portal.domain.EPUser;
import org.onap.portalapp.portal.framework.MockitoTestSuite;
@@ -84,7 +82,7 @@ public class SchedulerControllerTest {
AdminRolesService adminRolesService;
@InjectMocks
- SchedulerController schedulerController = new SchedulerController();
+ SchedulerController schedulerController;
@Before
public void setup() {
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);