From 5b1ad1ec6afa21f3c32b0132d65cda335eafc935 Mon Sep 17 00:00:00 2001 From: "Welch, Lorraine (lb2391)" Date: Mon, 17 Sep 2018 18:02:12 -0400 Subject: Changed ecomp and AT&T references Issue-ID: PORTAL-302 Change-Id: Iec2ed9ba78ceb81f3d5dff84837697482415937d Signed-off-by: Welch, Lorraine (lb2391) --- .../onap/portalapp/controller/core/LogoutControllerTest.java | 12 ++++++------ .../portalapp/controller/core/MenuListControllerTest.java | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'ecomp-sdk/epsdk-app-common/src/test') diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/LogoutControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/LogoutControllerTest.java index a6ffb038..8883cfa8 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/LogoutControllerTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/LogoutControllerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START========================================== * ONAP Portal SDK * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed @@ -108,7 +108,7 @@ public class LogoutControllerTest { ServletRequestAttributes ServletRequestAttributes = new ServletRequestAttributes(mockedRequest); Mockito.when(RequestContextHolder.currentRequestAttributes()).thenReturn(ServletRequestAttributes); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); logoutController.globalLogout(mockedRequest); } @@ -117,20 +117,20 @@ public class LogoutControllerTest { PowerMockito.mockStatic(PortalApiProperties.class); PowerMockito.mockStatic(PortalApiConstants.class); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); assertNull(logoutController.globalLogout(mockedRequest)); } @Test public void appLogoutTest(){ - ModelAndView actualModelView = new ModelAndView("redirect:https://portal.openecomp.org/ecompportal/process_csp"); + ModelAndView actualModelView = new ModelAndView("redirect:http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); PowerMockito.mockStatic(PortalApiProperties.class); PowerMockito.mockStatic(PortalApiConstants.class); PowerMockito.mockStatic(RequestContextHolder.class); ServletRequestAttributes ServletRequestAttributes = new ServletRequestAttributes(mockedRequest); Mockito.when(RequestContextHolder.currentRequestAttributes()).thenReturn(ServletRequestAttributes); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); ModelAndView expectedModelView = logoutController.appLogout(mockedRequest); assertEquals(actualModelView.getViewName(), expectedModelView.getViewName()); } @@ -140,7 +140,7 @@ public class LogoutControllerTest { PowerMockito.mockStatic(PortalApiProperties.class); PowerMockito.mockStatic(PortalApiConstants.class); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); assertNull(logoutController.appLogout(mockedRequest)); } diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/MenuListControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/MenuListControllerTest.java index 2d6c0cd1..cc935b38 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/MenuListControllerTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/MenuListControllerTest.java @@ -193,7 +193,7 @@ public class MenuListControllerTest { Mockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("user"); Mockito.when(session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME))).thenReturn(user); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); @@ -206,7 +206,7 @@ public class MenuListControllerTest { PowerMockito.mockStatic(PortalApiConstants.class); Mockito.when(mockedRequest.getParameter("page")).thenReturn("contact"); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); @@ -219,7 +219,7 @@ public class MenuListControllerTest { PowerMockito.mockStatic(PortalApiConstants.class); Mockito.when(mockedRequest.getParameter("page")).thenReturn("access"); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); @@ -231,7 +231,7 @@ public class MenuListControllerTest { PowerMockito.mockStatic(PortalApiProperties.class); PowerMockito.mockStatic(PortalApiConstants.class); Mockito.when(PortalApiProperties - .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("https://portal.openecomp.org/ecompportal/process_csp"); + .getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)).thenReturn("http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); -- cgit 1.2.3-korg