diff options
author | 2018-01-30 17:29:36 -0500 | |
---|---|---|
committer | 2018-02-01 15:10:02 -0500 | |
commit | 21a8761f684745bb300e075c7e98ad897ace9eed (patch) | |
tree | 6d585c3fe39fbb42a314941dbc8646e6ccf188cf /ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command | |
parent | 3af8af1310d5a27cb58be29505573f0bbdc1717c (diff) |
Security/ Package Name changes
Issue-ID: PORTAL-174, PORTAL-157, PORTAL-156, PORTAL-148, PORTAL-145,
PORTAL-140, PORTAL-133, PORTAL-121, PORTAL-111, PORTAL-88
Includes security fixes, Role Centralization, replace certain ECOMP
occurrences etc
Change-Id: I3c8b706709c6b92e646e3cbe50c2d660e8a46ef4
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command')
2 files changed, 0 insertions, 229 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/EPLoginBeanTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/EPLoginBeanTest.java deleted file mode 100644 index e540bd85..00000000 --- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/EPLoginBeanTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * ============LICENSE_START========================================== - * ONAP Portal - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); - * you may not use this software except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ============LICENSE_END============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.openecomp.portalapp.command; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import org.junit.Test; -import org.openecomp.portalapp.command.EPLoginBean; - -public class EPLoginBeanTest { - - -public EPLoginBean ePLoginBean(){ - - EPLoginBean ePLoginBean = new EPLoginBean(); - ePLoginBean.setLoginId("guestT"); - ePLoginBean.setLoginPwd("password"); - ePLoginBean.setHrid("hrId"); - ePLoginBean.setOrgUserId("guestT"); - ePLoginBean.setBusinessDirectMenu(null); - ePLoginBean.setSiteAccess("site_test"); - ePLoginBean.setLoginErrorMessage("error"); - ePLoginBean.setUser(null); - ePLoginBean.setMenu(null); - return ePLoginBean; - } - - @Test - public void ePLoginBeanTest(){ - EPLoginBean ePLoginBean = ePLoginBean(); - - assertEquals(ePLoginBean.getLoginId(), "guestT"); - assertEquals(ePLoginBean.getLoginPwd(), "password"); - assertEquals(ePLoginBean.getHrid(), "hrId"); - assertEquals(ePLoginBean.getOrgUserId(), "guestT"); - assertNull(ePLoginBean.getBusinessDirectMenu()); - assertEquals(ePLoginBean.getSiteAccess(), "site_test"); - assertEquals(ePLoginBean.getLoginErrorMessage(), "error"); - assertNull(ePLoginBean.getUser()); - assertNull(ePLoginBean.getMenu()); - - - } -} diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/PostSearchBeanTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/PostSearchBeanTest.java deleted file mode 100644 index 324d91d7..00000000 --- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/PostSearchBeanTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/*- - * ============LICENSE_START========================================== - * ONAP Portal - * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * - * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); - * you may not use this software except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ============LICENSE_END============================================ - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */ -package org.openecomp.portalapp.command; - -import static org.junit.Assert.*; - -import org.junit.Test; -import org.mockito.InjectMocks; -import org.openecomp.portalapp.portal.core.MockEPUser; -import org.openecomp.portalapp.portal.domain.EPUser; - -public class PostSearchBeanTest { - - @InjectMocks - PostSearchBean mockPostSearchBean = new PostSearchBean(); - - MockEPUser mockUser = new MockEPUser(); - public PostSearchBean mockPostSearchBean(){ - - PostSearchBean postSearchBean = new PostSearchBean(); - EPUser user = mockUser.mockEPUser(); - postSearchBean.setUser(user); - postSearchBean.setUserOrig(null); - postSearchBean.setSelected(null); - postSearchBean.setHrid(null); - postSearchBean.setPostUserId(null); - postSearchBean.setPostFirstName(null); - postSearchBean.setPostLastName(null); - postSearchBean.setPostOrgCode(null); - postSearchBean.setPostPhone(null); - postSearchBean.setPostEmail(null); - postSearchBean.setPostAddress1(null); - postSearchBean.setPostAddress2(null); - postSearchBean.setPostCity(null); - postSearchBean.setPostState(null); - postSearchBean.setPostZipCode(null); - postSearchBean.setPostLocationClli(null); - postSearchBean.setPostBusinessCountryCode(null); - postSearchBean.setPostBusinessCountryName(null); - postSearchBean.setPostDepartment(null); - postSearchBean.setPostDepartmentName(null); - postSearchBean.setPostBusinessUnit(null); - postSearchBean.setPostBusinessUnitName(null); - postSearchBean.setPostJobTitle(null); - postSearchBean.setOrgManagerUserId(null); - postSearchBean.setPostCommandChain(null); - postSearchBean.setPostCompanyCode(null); - postSearchBean.setPostCostCenter(null); - postSearchBean.setPostSiloStatus(null); - postSearchBean.setPostFinancialLocCode(null); - postSearchBean.setPostManagerUserId(null); - return postSearchBean; - } - - @Test - public void postSearchBeanTest() - { - PostSearchBean postSearchBean = mockPostSearchBean(); - EPUser user = mockUser.mockEPUser(); - assertEquals(postSearchBean.getUser().getActive(), user.getActive()); - assertNull(postSearchBean.getUserOrig()); - assertNull(postSearchBean.getSelected()); - assertNull(postSearchBean.getHrid()); - assertNull(postSearchBean.getPostOrgUserId()); - assertNull(postSearchBean.getPostFirstName()); - assertNull(postSearchBean.getPostLastName()); - assertNull(postSearchBean.getPostOrgCode()); - assertNull(postSearchBean.getPostPhone()); - assertNull(postSearchBean.getPostEmail()); - assertNull(postSearchBean.getPostAddress1()); - assertNull(postSearchBean.getPostAddress2()); - assertNull(postSearchBean.getPostCity()); - assertNull(postSearchBean.getPostState()); - assertNull(postSearchBean.getPostZipCode()); - assertNull(postSearchBean.getPostLocationClli()); - assertNull(postSearchBean.getPostBusinessCountryCode()); - assertNull(postSearchBean.getPostBusinessCountryName()); - assertNull(postSearchBean.getPostDepartment()); - assertNull(postSearchBean.getPostDepartmentName()); - assertNull(postSearchBean.getPostBusinessUnit()); - assertNull(postSearchBean.getPostBusinessUnitName()); - assertNull(postSearchBean.getPostJobTitle()); - assertNull(postSearchBean.getOrgManagerUserId()); - assertNull(postSearchBean.getPostCommandChain()); - assertNull(postSearchBean.getPostCompanyCode()); - assertNull(postSearchBean.getPostCostCenter()); - assertNull(postSearchBean.getPostSiloStatus()); - assertNull(postSearchBean.getPostFinancialLocCode()); - assertNull(postSearchBean.getPostManagerUserId()); - } - - @Test - public void isCriteriaUpdatedIfUserNotNullTest() - { - assertFalse(mockPostSearchBean.isCriteriaUpdated()); - } - - @Test - public void isCriteriaUpdatedIfUserNullTest() - { - mockPostSearchBean.setUser(null); - assertTrue(mockPostSearchBean.isCriteriaUpdated()); - } - - - @Test - public void isCriteriaUpdatedIfUserTest() - { - mockPostSearchBean.setUser(null); - mockPostSearchBean.setUserOrig(null); - assertFalse(mockPostSearchBean.isCriteriaUpdated()); - } - -} |