summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common/src/test/java')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/command/EPLoginBeanTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/EPLoginBeanTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/command/PostSearchBeanTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/PostSearchBeanTest.java)13
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/NotificationCleanupTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/NotificationCleanupTest.java)34
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/PortalCentralAccessConfigurationTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/PortalCentralAccessConfigurationTest.java)15
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java)42
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppContactUsControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java)32
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java)38
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java)70
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AuditLogControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java)20
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BEPropertyReaderControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java)20
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BasicAuthAccountControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java)34
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/CommonWidgetControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java)24
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ConsulClientControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java)22
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java)54
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardSearchResultControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java)32
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPFusionBaseControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java)30
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPRestrictedBaseControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPRestrictedBaseControllerTest.java)11
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java)352
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java)48
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java)58
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/GetAccessControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java)24
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ManifestControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java)16
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java)33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceProxyControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java)22
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PolicyControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PolicyControllerTest.java)97
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PortalAdminControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java)39
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java525
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RolesApprovalSystemControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java)24
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SchedulerControllerTest.java)21
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SessionCommunicationControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java)19
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestClient.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java)21
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextTestProperties.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/TicketEventControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java)25
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java)40
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserNotificationControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java)40
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserRolesControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java)46
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java)36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogControllerTest.java139
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java)22
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/shared-context-test.properties28
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/MockEPUser.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/PopulateSampleTestData.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java)85
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RemoveSampleTestData.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java)114
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RestURLsTestSuite.java353
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserAppTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserApplicationsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AppContactUsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralRoleFunctionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java)21
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralV2RoleFunctionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java)47
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppRoleFunctionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointAccountTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppCatalogRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java)14
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserNotificationTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleIdTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalRoleDetailsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemAccessTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/GetAccessResultIdTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceDataTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceParameterTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserAppSelectionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserWidgetSelectionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ResultTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/SharedContextTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/UserIdRoleIdTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogParameterTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java)14
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetParameterResultTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/ApplicationCommonContextTestSuite.java191
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/MockitoTestSuite.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java)8
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/listener/HealthMonitorTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java)9
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCatalogItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCategoryFunctionsItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppContactUsItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/SearchResultItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java)26
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/DashboardSearchServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java)22
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java)38
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java)26
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java)20
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java)128
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java)28
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuServiceImplTest.java92
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/GetAccessServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java)20
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ManifestServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java)28
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AnalyticsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java)11
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppCatalogPersonalizationTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java)9
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppNameIdIsAdminTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppWithRolesForUserTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java)11
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppsListWithAdminRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadRoleFunctionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadUserRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java)9
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java)9
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralAppTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java)65
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java)76
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserAppTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java)42
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java)38
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsManualPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsSortPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPUserAppCurrentRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EcompUserAppRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemExtVOTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java)11
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemVOTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java)11
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpRoleNotificationItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsDetailTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRolePermsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuItemTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RemoteUserWithRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RoleInAppForUserTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserApplicationRolesTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java)12
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserWithNameSurnameTitleTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java)10
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/utils/EcompPortalUtilsTest.java (renamed from ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java)9
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java226
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties46
141 files changed, 2970 insertions, 1765 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/onap/portalapp/command/EPLoginBeanTest.java
index e540bd85..88ba024b 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/EPLoginBeanTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/command/EPLoginBeanTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.command;
+package org.onap.portalapp.command;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
-import org.openecomp.portalapp.command.EPLoginBean;
+import org.onap.portalapp.command.EPLoginBean;
public class EPLoginBeanTest {
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/onap/portalapp/command/PostSearchBeanTest.java
index 324d91d7..2b095731 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/command/PostSearchBeanTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/command/PostSearchBeanTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,15 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.command;
+package org.onap.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;
+import org.onap.portalapp.command.PostSearchBean;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
public class PostSearchBeanTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/NotificationCleanupTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/NotificationCleanupTest.java
index 0cd82ae7..8d374526 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/NotificationCleanupTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/NotificationCleanupTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.config;
+package org.onap.portalapp.config;
import org.junit.Before;
import org.junit.Test;
@@ -44,8 +44,8 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.service.UserNotificationService;
-import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
+import org.onap.portalapp.portal.service.UserNotificationService;
+import org.onap.portalapp.portal.service.UserNotificationServiceImpl;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -54,30 +54,32 @@ import org.springframework.context.ApplicationContext;
@RunWith(PowerMockRunner.class)
@PrepareForTest(NotificationCleanupConfig.class)
public class NotificationCleanupTest {
-
+
+
@InjectMocks
NotificationCleanup notificationCleanup = new NotificationCleanup();
-
+
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
}
-
@Mock
- UserNotificationService userNotificationService = new UserNotificationServiceImpl();
+ UserNotificationService userNotificationService = new UserNotificationServiceImpl();
@Mock
- ApplicationContext applicationContext;
-
+ ApplicationContext applicationContext ;
+
+
@Test
- public void runTest() {
- PowerMockito.mockStatic(NotificationCleanupConfig.class);
+ public void runTest()
+ {
+ PowerMockito.mockStatic(NotificationCleanupConfig.class);
Mockito.when(NotificationCleanupConfig.getApplicationContext()).thenReturn(applicationContext);
- Mockito.when((applicationContext).getBean(UserNotificationService.class)).thenReturn(userNotificationService);
+ Mockito.when((applicationContext).getBean(UserNotificationService.class)).thenReturn(userNotificationService);
Mockito.doNothing().when(userNotificationService).deleteNotificationsFromEpUserNotificationTable();
Mockito.doNothing().when(userNotificationService).deleteNotificationsFromEpRoleNotificationTable();
Mockito.doNothing().when(userNotificationService).deleteNotificationsFromEpNotificationTable();
- notificationCleanup.run();
+ notificationCleanup.run();
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/PortalCentralAccessConfigurationTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/PortalCentralAccessConfigurationTest.java
index d58beac9..a472f05f 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/config/PortalCentralAccessConfigurationTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/config/PortalCentralAccessConfigurationTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.config;
+package org.onap.portalapp.config;
import static org.junit.Assert.assertEquals;
@@ -44,9 +44,10 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.service.EPRoleFunctionService;
-import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
-import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceImpl;
+import org.onap.portalapp.config.PortalCentralAccessConfiguration;
+import org.onap.portalapp.portal.service.EPRoleFunctionService;
+import org.onap.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
+import org.onap.portalapp.portal.service.EPRoleFunctionServiceImpl;
public class PortalCentralAccessConfigurationTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java
index a04c1b07..7b099824 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -55,23 +55,23 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.AppCatalogController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
-import org.openecomp.portalapp.portal.service.EPAppService;
-import org.openecomp.portalapp.portal.service.PersUserAppService;
-import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
-import org.openecomp.portalapp.portal.transport.AppCatalogPersonalization;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.AppCatalogController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.onap.portalapp.portal.service.EPAppService;
+import org.onap.portalapp.portal.service.PersUserAppService;
+import org.onap.portalapp.portal.service.PersUserAppServiceImpl;
+import org.onap.portalapp.portal.transport.AppCatalogPersonalization;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
public class AppCatalogControllerTest extends MockitoTestSuite {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppContactUsControllerTest.java
index 487b116e..522ef7ca 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppContactUsControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -54,18 +54,18 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.AppContactUsController;
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.AppContactUsService;
-import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.AppContactUsController;
+import org.onap.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.onap.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AppContactUsService;
+import org.onap.portalapp.portal.service.AppContactUsServiceImpl;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.domain.support.CollaborateList;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java
index a979a5b1..3a81a6f8 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -51,21 +51,21 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.AppsControllerExternalRequest;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.EPAppService;
-import org.openecomp.portalapp.portal.service.PortalAdminService;
-import org.openecomp.portalapp.portal.service.UserService;
-import org.openecomp.portalapp.portal.service.UserServiceImpl;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.OnboardingApp;
-import org.openecomp.portalapp.util.EPUserUtils;
+import org.onap.portalapp.portal.controller.AppsControllerExternalRequest;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.EPAppService;
+import org.onap.portalapp.portal.service.PortalAdminService;
+import org.onap.portalapp.portal.service.UserService;
+import org.onap.portalapp.portal.service.UserServiceImpl;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.OnboardingApp;
+import org.onap.portalapp.util.EPUserUtils;
public class AppsControllerExternalRequestTest extends MockitoTestSuite {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java
index e5c30ed5..95f1d224 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.*;
@@ -52,36 +52,37 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
+import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.AppsController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.AdminUserApplications;
-import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
-import org.openecomp.portalapp.portal.domain.AppsResponse;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.EcompApp;
-import org.openecomp.portalapp.portal.domain.UserRole;
-import org.openecomp.portalapp.portal.domain.UserRoles;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
-import org.openecomp.portalapp.portal.service.EPAppService;
-import org.openecomp.portalapp.portal.service.EPLeftMenuService;
-import org.openecomp.portalapp.portal.service.EPLeftMenuServiceImpl;
-import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
-import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
-import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
-import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.LocalRole;
-import org.openecomp.portalapp.portal.transport.OnboardingApp;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.onap.portalapp.portal.controller.AppsController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.AdminUserApplications;
+import org.onap.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.onap.portalapp.portal.domain.AppsResponse;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.EcompApp;
+import org.onap.portalapp.portal.domain.UserRole;
+import org.onap.portalapp.portal.domain.UserRoles;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.onap.portalapp.portal.service.EPAppService;
+import org.onap.portalapp.portal.service.EPLeftMenuService;
+import org.onap.portalapp.portal.service.EPLeftMenuServiceImpl;
+import org.onap.portalapp.portal.transport.EPAppsManualPreference;
+import org.onap.portalapp.portal.transport.EPAppsSortPreference;
+import org.onap.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.onap.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.LocalRole;
+import org.onap.portalapp.portal.transport.OnboardingApp;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.web.support.AppUtils;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -676,7 +677,10 @@ public class AppsControllerTest extends MockitoTestSuite{
expectedRoleList.add(localRole);
long appId = 1;
Mockito.when(appService.getAppRoles(appId)).thenReturn(expectedRoleList);
- List<LocalRole> actualRoleList = appsController.getAppRoles(mockedRequest, appId);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isAccountAdminOfApplication(Matchers.anyObject(), Matchers.anyObject())).thenReturn(true);
+ List<LocalRole> actualRoleList = appsController.getAppRoles(mockedRequest, appId, mockedResponse);
assertEquals(actualRoleList, expectedRoleList);
}
@@ -684,7 +688,7 @@ public class AppsControllerTest extends MockitoTestSuite{
public void getAppRolesExceptionTest() {
long appId = 1;
Mockito.when(appService.getAppRoles(appId)).thenThrow(nullPointerException);
- assertNull(appsController.getAppRoles(mockedRequest, appId));
+ assertNull(appsController.getAppRoles(mockedRequest, appId, mockedResponse));
}
@Test
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AuditLogControllerTest.java
index 68371d06..27e72b64 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AuditLogControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -47,12 +47,12 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.AuditLogController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.service.AuditService;
+import org.onap.portalapp.portal.controller.AuditLogController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.service.AuditService;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BEPropertyReaderControllerTest.java
index 41233c82..3ece25ff 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BEPropertyReaderControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -47,12 +47,12 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.BEPropertyReaderController;
-import org.openecomp.portalapp.portal.domain.BEProperty;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.BEPropertyReaderController;
+import org.onap.portalapp.portal.domain.BEProperty;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BasicAuthAccountControllerTest.java
index 5a27755a..bec28d59 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/BasicAuthAccountControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -51,19 +51,19 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.BasicAuthAccountController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
-import org.openecomp.portalapp.portal.domain.EPEndpoint;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.BasicAuthAccountService;
-import org.openecomp.portalapp.portal.service.BasicAuthAccountServiceImpl;
-import org.openecomp.portalapp.util.EPUserUtils;
+import org.onap.portalapp.portal.controller.BasicAuthAccountController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.BasicAuthCredentials;
+import org.onap.portalapp.portal.domain.EPEndpoint;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.BasicAuthAccountService;
+import org.onap.portalapp.portal.service.BasicAuthAccountServiceImpl;
+import org.onap.portalapp.util.EPUserUtils;
public class BasicAuthAccountControllerTest extends MockitoTestSuite {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/CommonWidgetControllerTest.java
index 51d871d9..76961f89 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/CommonWidgetControllerTest.java
@@ -1,12 +1,13 @@
+
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -34,8 +35,7 @@
* ============LICENSE_END============================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.openecomp.portalapp.portal.controller;
+ */package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -47,13 +47,13 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.CommonWidgetController;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.DashboardSearchService;
-import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.onap.portalapp.portal.controller.CommonWidgetController;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.DashboardSearchService;
+import org.onap.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.onap.portalapp.portal.transport.CommonWidgetMeta;
public class CommonWidgetControllerTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ConsulClientControllerTest.java
index d9e50467..8481413e 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ConsulClientControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -51,13 +51,13 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.ConsulClientController;
-import org.openecomp.portalapp.portal.domain.BEProperty;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.ConsulHealthService;
-import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.onap.portalapp.portal.controller.ConsulClientController;
+import org.onap.portalapp.portal.domain.BEProperty;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ConsulHealthService;
+import org.onap.portalapp.portal.service.ConsulHealthServiceImpl;
import com.orbitz.consul.ConsulException;
import com.orbitz.consul.model.health.ServiceHealth;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardControllerTest.java
index 0e8b74d8..37f7f687 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.*;
@@ -51,23 +51,26 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
+import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.DashboardController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.DashboardSearchService;
-import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
-import org.openecomp.portalapp.portal.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.DashboardController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.DashboardSearchService;
+import org.onap.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.onap.portalapp.portal.transport.CommonWidget;
+import org.onap.portalapp.portal.transport.CommonWidgetMeta;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.domain.support.CollaborateList;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -83,6 +86,8 @@ public class DashboardControllerTest {
@InjectMocks
DashboardController dashboardController = new DashboardController();
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
@@ -155,7 +160,6 @@ public class DashboardControllerTest {
expectedData.setResponse(commonWidgetMeta);
PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
- System.out.println(actualResponse);
assertEquals(expectedData,actualResponse);
}
@@ -239,7 +243,8 @@ public class DashboardControllerTest {
expectedData.setMessage("ERROR");
expectedData.setResponse("Category cannot be null or empty");
- PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ Mockito.when(adminRolesService.isSuperAdmin(Matchers.anyObject())).thenReturn(true);
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget, mockedRequest, mockedResponse);
assertEquals(expectedData,actualResponse);
}
@@ -252,8 +257,8 @@ public class DashboardControllerTest {
expectedData.setStatus(PortalRestStatusEnum.ERROR);
expectedData.setMessage("Invalid category: test");
expectedData.setResponse(null);
-
- PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ Mockito.when(adminRolesService.isSuperAdmin(Matchers.anyObject())).thenReturn(true);
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget, mockedRequest, mockedResponse);
assertEquals(expectedData,actualResponse);
}
@@ -279,10 +284,9 @@ public class DashboardControllerTest {
expectedData.setStatus(PortalRestStatusEnum.OK);
expectedData.setMessage("success");
expectedData.setResponse("success");
-
+ Mockito.when(adminRolesService.isSuperAdmin(Matchers.anyObject())).thenReturn(true);
Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn("success");
-
- PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget, mockedRequest, mockedResponse);
assertEquals(expectedData,actualResponse);
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardSearchResultControllerTest.java
index 9ac81b6c..229f1ba9 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/DashboardSearchResultControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -53,18 +53,18 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.DashboardSearchResultController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
-import org.openecomp.portalapp.portal.service.DashboardSearchService;
-import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
-import org.openecomp.portalapp.portal.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.util.EPUserUtils;
+import org.onap.portalapp.portal.controller.DashboardSearchResultController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.ecomp.model.SearchResultItem;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.DashboardSearchService;
+import org.onap.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.onap.portalapp.portal.transport.CommonWidget;
+import org.onap.portalapp.portal.transport.CommonWidgetMeta;
+import org.onap.portalapp.util.EPUserUtils;
public class DashboardSearchResultControllerTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPFusionBaseControllerTest.java
index ef857d0d..d7950e37 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPFusionBaseControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.*;
@@ -55,17 +55,17 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.controller.EPFusionBaseController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.DashboardSearchService;
-import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.MenuData;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.controller.EPFusionBaseController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.DashboardSearchService;
+import org.onap.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.domain.MenuData;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPRestrictedBaseControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPRestrictedBaseControllerTest.java
index 6bcf2733..ca415121 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPRestrictedBaseControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/EPRestrictedBaseControllerTest.java
@@ -1,12 +1,13 @@
+
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +36,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.*;
@@ -43,7 +44,7 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.onap.portalapp.controller.EPRestrictedBaseController;
public class EPRestrictedBaseControllerTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java
index e578844f..859cc4c2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,39 +35,52 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.mockito.InjectMocks;
+import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
-import org.openecomp.portalapp.portal.service.ExternalAccessRolesServiceImpl;
-import org.openecomp.portalapp.portal.transport.CentralRole;
-import org.openecomp.portalsdk.core.domain.AuditLog;
-import org.openecomp.portalsdk.core.domain.Role;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.CentralV2RoleFunction;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ExternalAccessRolesService;
+import org.onap.portalapp.portal.service.ExternalAccessRolesServiceImpl;
+import org.onap.portalapp.portal.transport.CentralRoleFunction;
+import org.onap.portalapp.portal.transport.CentralV2Role;
+import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.onap.portalsdk.core.domain.AuditLog;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
+import org.springframework.beans.BeanUtils;
import org.springframework.http.HttpStatus;
import org.springframework.web.client.HttpClientErrorException;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
public class ExternalAccessRolesControllerTest {
@Mock
@@ -96,16 +109,26 @@ public class ExternalAccessRolesControllerTest {
@Test
public void getUserTest() throws Exception {
- List<EPUser> userList = new ArrayList<>();
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ List<EPUser> userList = new ArrayList<>();
Mockito.when(externalAccessRolesService.getUser(loginId)).thenReturn(userList);
- assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getUserExceptionTest() throws Exception {
- Mockito.when(externalAccessRolesService.getUser(loginId))
- .thenThrow(nullPointerException);
- assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
public EPApp mockApp()
@@ -133,81 +156,114 @@ public class ExternalAccessRolesControllerTest {
return app;
}
- @Test
+ @Test(expected = NullPointerException.class)
public void getRolesForAppTest() throws Exception {
List<EPApp> applicationList = new ArrayList<EPApp>();
- List<CentralRole> answer = new ArrayList<>();
+ List<CentralV2Role> answer = new ArrayList<>();
EPApp app = mockApp();
applicationList.add(app);
Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey))).thenReturn(answer);
- assertEquals(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse), answer);
+ assertEquals(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse), null);
}
- @Test
+ @Test(expected = NullPointerException.class)
public void getRolesForAppExceptionTest() throws Exception {
List<EPApp> applicationList = new ArrayList<EPApp>();
- List<CentralRole> answer = new ArrayList<>();
EPApp app = mockApp();
applicationList.add(app);
Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
- Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey)))
- .thenThrow(httpClientErrorException);
- assertNull(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse));
+ externalAccessRolesController.getRolesForApp(mockedRequest,mockedResponse);
+ List<CentralV2Role> role = externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey));
+ assertEquals(null,role);
}
@Test
public void getRoleFunctionsListTest() throws Exception {
- List<CentralRoleFunction> answer = new ArrayList<>();
- Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey))).thenReturn(answer);
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ List<CentralV2RoleFunction> answer = null;
+ Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey))).thenReturn(null);
assertEquals(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse), answer);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getRoleFunctionsListExceptionTest() throws Exception {
- Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey)))
- .thenThrow(httpClientErrorException);
- assertNull(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse));
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getRoleInfoTest() throws Exception {
- CentralRole answer = new CentralRole();
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ CentralV2Role answer = new CentralV2Role();
long roleId = 1;
Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
.thenReturn(answer);
- assertEquals(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId), answer);
+ externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getRoleInfoExceptionTest() throws Exception {
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
long roleId = 1;
- Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
- .thenThrow(httpClientErrorException);
assertNull(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId));
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getRoleFunctionTest() throws Exception {
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
String code = "test_menu";
Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
- .thenReturn(centralRoleFunction);
- assertEquals(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code),
- centralRoleFunction);
+ .thenReturn(centralV2RoleFunction);
+ CentralRoleFunction returnedValue = externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code);
+ BeanUtils.copyProperties(centralV2RoleFunction, centralRoleFunction, "type","action");
+ assertEquals(returnedValue,centralRoleFunction);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getRoleFunctionExceptionTest() throws Exception {
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
String code = "test_menu";
Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
.thenThrow(httpClientErrorException);
- assertNull(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code));
+ assertEquals(new CentralRoleFunction(),externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code));
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
- @Test
+ @Test(expected = NullPointerException.class)
public void saveRoleFunctionIfIsIsNotDeletedTest() throws Exception {
List<EPApp> applicationList = new ArrayList<EPApp>();
EPApp app = mockApp();
@@ -215,18 +271,17 @@ public class ExternalAccessRolesControllerTest {
Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
PortalRestResponse<String> portalRestResponse = null;
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
- expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
expectedportalRestResponse.setResponse("Failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
String data = null;
- CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(false);
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralV2RoleFunction, app)).thenReturn(false);
portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
assertEquals(portalRestResponse, expectedportalRestResponse);
}
- @Test
+ @Test(expected = NullPointerException.class)
public void saveRoleFunctionExceptionTest() throws Exception {
List<EPApp> applicationList = new ArrayList<EPApp>();
EPApp app = mockApp();
@@ -234,22 +289,17 @@ public class ExternalAccessRolesControllerTest {
Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
PortalRestResponse<String> portalRestResponse = null;
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
- expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
expectedportalRestResponse.setResponse("Failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
- String data = null;
- CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenThrow(nullPointerException);
- portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, null);
System.out.println(portalRestResponse);
assertEquals(portalRestResponse, expectedportalRestResponse);
}
- @Test
+ @Test(expected = NullPointerException.class)
public void saveRoleFunctionTest() throws Exception {
List<EPApp> applicationList = new ArrayList<EPApp>();
- List<CentralRole> answer = new ArrayList<>();
EPApp app = mockApp();
applicationList.add(app);
Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
@@ -260,51 +310,76 @@ public class ExternalAccessRolesControllerTest {
PortalRestStatusEnum portalRestStatusEnum = null;
expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
String data = null;
- CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(true);
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralV2RoleFunction, app)).thenReturn(true);
portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
System.out.println(portalRestResponse);
assertEquals(portalRestResponse, expectedportalRestResponse);
}
-// @Test
-// public void deleteRoleFunctionTest() throws Exception {
-// PortalRestResponse<String> portalRestResponse = null;
-// PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
-// expectedportalRestResponse.setMessage("Successfully Deleted");
-// expectedportalRestResponse.setResponse("Success");
-// PortalRestStatusEnum portalRestStatusEnum = null;
-// EPUser user = mockUser.mockEPUser();
-// EPApp app = mockApp();
-// expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
-// String code ="testNew";
-// Mockito.when(externalAccessRolesService.getUser(mockedRequest.getHeader("LOGIN_ID"))).thenReturn((List<EPUser>) user);
-// Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader("UEBKEY")).get(0)).thenReturn(app);
-// Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(code, app)).thenReturn(true);
-// portalRestResponse = externalAccessRolesController.deleteRoleFunction(mockedRequest, mockedResponse, code);
-// assertEquals(portalRestResponse, expectedportalRestResponse);
-// }
+ @Test
+ @Ignore
+ public void deleteRoleFunctionTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully Deleted");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ EPUser user = mockUser.mockEPUser();
+ EPApp app = mockApp();
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ String code ="testNew";
+ Mockito.when(externalAccessRolesService.getUser(mockedRequest.getHeader("LOGIN_ID"))).thenReturn((List<EPUser>) user);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader("UEBKEY")).get(0)).thenReturn(app);
+ Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(code, app)).thenReturn(true);
+ portalRestResponse = externalAccessRolesController.deleteRoleFunction(mockedRequest, mockedResponse, code);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
@Test
public void getActiveRolesTest() throws Exception {
- List<CentralRole> cenRole = new ArrayList<>();
- Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey))).thenReturn(cenRole);
- List<CentralRole> expectedCenRole = externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse);
- assertEquals(expectedCenRole, cenRole);
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey))).thenReturn(null);
+ List<CentralV2Role> expectedCenRole = externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse);
+ assertNull(expectedCenRole);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getActiveRolesExceptionTest() throws Exception {
- Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey)))
- .thenThrow(httpClientErrorException);
- assertNull(externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse));
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
+ }
+
+ /**
+ * It return JSON string which has error information
+ *
+ * @return JSON String
+ * @throws JsonProcessingException
+ */
+ private String getInvalidKeyJson() throws JsonProcessingException {
+ final Map<String,String> uebkeyResponse = new HashMap<>();
+ String reason = "";
+ ObjectMapper mapper = new ObjectMapper();
+ uebkeyResponse.put("error","Invalid uebkey!");
+ reason = mapper.writeValueAsString(uebkeyResponse);
+ return reason;
}
@Test
public void deleteDependcyRoleRecordExceptionTest() throws Exception {
PortalRestResponse<String> portalRestResponse = null;
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
- expectedportalRestResponse.setMessage("Failed to deleteDependencyRoleRecord");
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
expectedportalRestResponse.setResponse("Failed");
PortalRestStatusEnum portalRestStatusEnum = null;
expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
@@ -473,47 +548,45 @@ public class ExternalAccessRolesControllerTest {
@Test
public void getMenuFunctionsTest() throws Exception {
- List<String> functionsList = new ArrayList<>();
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
- .thenReturn(functionsList);
+ .thenReturn(null);
List<String> expectedFunctionsList = externalAccessRolesController.getMenuFunctions(mockedRequest,
mockedResponse);
- assertEquals(functionsList, expectedFunctionsList);
+ assertNull(expectedFunctionsList);
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
@Test
public void getMenuFunctionsExceptionTest() throws Exception {
+ String reason = getInvalidKeyJson();
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
.thenThrow(httpClientErrorException);
assertNull(externalAccessRolesController.getMenuFunctions(mockedRequest, mockedResponse));
+ String result = sw.getBuffer().toString().trim();
+ assertEquals(reason, result);
}
-// @Test
-// public void getUsersOfApplicationTest() throws Exception {
-// List<String> users = new ArrayList<>();
-// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey))).thenReturn(users);
-// List<String> expectedusers = externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse);
-// assertEquals(users, expectedusers);
-// }
-
-// @Test
-// public void getUsersOfApplicationExceptionTest() throws Exception {
-// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey)))
-// .thenThrow(httpClientErrorException);
-// assertNull(externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse));
-// }
@Test
public void saveRoleExceptionTest() throws Exception {
Role role = new Role();
PortalRestResponse<String> portalRestResponse = null;
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
- expectedportalRestResponse.setMessage("Failed to saveRole");
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
expectedportalRestResponse.setResponse("Failed");
PortalRestStatusEnum portalRestStatusEnum = null;
expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
List<Role> upload = new ArrayList<>();
portalRestResponse = externalAccessRolesController.saveRole(mockedRequest, mockedResponse,role);
+
assertEquals(portalRestResponse, expectedportalRestResponse);
}
@@ -522,7 +595,7 @@ public class ExternalAccessRolesControllerTest {
String role = "TestNew";
PortalRestResponse<String> portalRestResponse = null;
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
- expectedportalRestResponse.setMessage("Failed to deleteRole for 'TestNew'");
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
expectedportalRestResponse.setResponse("Failed");
PortalRestStatusEnum portalRestStatusEnum = null;
expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
@@ -566,4 +639,73 @@ public class ExternalAccessRolesControllerTest {
Mockito.when(externalAccessRolesService.getAllAppUsers(mockedRequest.getHeader(uebKey))).thenThrow(nullPointerException);
assertNull(externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse));
}
+
+ @Test(expected = NullPointerException.class)
+ public void deleteRoleV2Test() throws Exception
+ {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true, "Success");
+ Mockito.when(externalAccessRolesService.deleteDependencyRoleRecord(Matchers.anyLong(),Matchers.anyString(),Matchers.anyString())).thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully Deleted");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ PortalRestResponse<String> actualResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse, (long)1);
+ assertNull(actualResponse);
+ }
+
+ @Test
+ public void deleteRoleV2InvalidUebKeyTest() throws Exception
+ {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenThrow(new Exception("Invalid uebkey!"));
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Invalid uebkey!");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ PortalRestResponse<String> actualResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse, (long)1);
+ assertEquals(actualResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void deleteRoleV2InvalidUebKeyWithDiffErrorTest() throws Exception
+ {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenThrow(new Exception("test"));
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("test");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ PortalRestResponse<String> actualResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse, (long)1);
+ assertEquals(actualResponse, expectedportalRestResponse);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void deleteRoleV2ExceptionTest() throws Exception
+ {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false, "failed");
+ Mockito.when(externalAccessRolesService.deleteDependencyRoleRecord(Matchers.anyLong(),Matchers.anyString(),Matchers.anyString())).thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to deleteRole");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ PortalRestResponse<String> actualResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse, (long)1);
+ assertEquals(actualResponse, null);
+ }
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java
index 4bd3288a..ae2497e4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -53,26 +53,26 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.ExternalAppsRestfulController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.EPLoginService;
-import org.openecomp.portalapp.portal.service.EPLoginServiceImpl;
-import org.openecomp.portalapp.portal.service.EPRoleService;
-import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
-import org.openecomp.portalapp.portal.service.UserNotificationService;
-import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.onap.portalapp.portal.controller.ExternalAppsRestfulController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.EPLoginService;
+import org.onap.portalapp.portal.service.EPLoginServiceImpl;
+import org.onap.portalapp.portal.service.EPRoleService;
+import org.onap.portalapp.portal.service.EPRoleServiceImpl;
+import org.onap.portalapp.portal.service.FunctionalMenuService;
+import org.onap.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.onap.portalapp.portal.service.UserNotificationService;
+import org.onap.portalapp.portal.service.UserNotificationServiceImpl;
+import org.onap.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.onap.portalapp.portal.transport.FunctionalMenuItem;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java
index b72ef9af..488717ca 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/FunctionalMenuControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -56,28 +56,28 @@ import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.runners.MockitoJUnitRunner;
-import org.openecomp.portalapp.portal.controller.FunctionalMenuController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
-import org.openecomp.portalapp.portal.service.SearchService;
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.FunctionalMenuController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.FunctionalMenuService;
+import org.onap.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.onap.portalapp.portal.service.SearchService;
+import org.onap.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.onap.portalapp.portal.transport.BusinessCardApplicationRolesList;
+import org.onap.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.onap.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.FunctionalMenuItem;
+import org.onap.portalapp.portal.transport.FunctionalMenuItemWithRoles;
+import org.onap.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -293,7 +293,7 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
@Test
public void getFunctionalMenuItemDetailsBadPermissionTest(){
- Integer menuId = 1234;
+ Long menuId = 1234L;
FunctionalMenuItem actualmenuItem = null;
FunctionalMenuItem expectedmenuItem = null;
EPUser user = mockUser.mockEPUser();
@@ -305,7 +305,7 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
@Test
public void getFunctionalMenuItemDetailsExceptionTest(){
- Integer menuId = 1234;
+ Long menuId = 1234L;
FunctionalMenuItem actualmenuItem = null;
FunctionalMenuItem expectedmenuItem = null;
EPUser user = mockUser.mockEPUser();
@@ -319,7 +319,7 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
@Test
public void getFunctionalMenuItemDetailsTest(){
- Integer menuId = 1234;
+ Long menuId = 1234L;
FunctionalMenuItem actualmenuItem = null;
FunctionalMenuItem expectedmenuItem = null;
EPUser user = mockUser.mockEPUser();
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/GetAccessControllerTest.java
index e18704fe..dbe4b7b7 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/GetAccessControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -52,14 +52,14 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.GetAccessController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.GetAccessResult;
-import org.openecomp.portalapp.portal.service.GetAccessService;
-import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
-import org.openecomp.portalapp.util.EPUserUtils;
+import org.onap.portalapp.portal.controller.GetAccessController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.GetAccessResult;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.GetAccessService;
+import org.onap.portalapp.portal.service.GetAccessServiceImpl;
+import org.onap.portalapp.util.EPUserUtils;
public class GetAccessControllerTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ManifestControllerTest.java
index 61d5bb34..fdab8151 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ManifestControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -50,10 +50,10 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.ManifestController;
-import org.openecomp.portalapp.portal.service.ManifestService;
-import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+import org.onap.portalapp.portal.controller.ManifestController;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ManifestService;
+import org.onap.portalapp.portal.service.ManifestServiceImpl;
public class ManifestControllerTest extends MockitoTestSuite{
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceControllerTest.java
index 3b569aca..e6e9f759 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -52,18 +52,19 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.MicroserviceData;
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.ConsulHealthService;
-import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
-import org.openecomp.portalapp.portal.service.MicroserviceService;
-import org.openecomp.portalapp.portal.service.MicroserviceServiceImpl;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.MicroserviceController;
+import org.onap.portalapp.portal.domain.MicroserviceData;
+import org.onap.portalapp.portal.domain.WidgetCatalog;
+import org.onap.portalapp.portal.domain.WidgetServiceHeaders;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ConsulHealthService;
+import org.onap.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.onap.portalapp.portal.service.MicroserviceService;
+import org.onap.portalapp.portal.service.MicroserviceServiceImpl;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceProxyControllerTest.java
index e712e4d2..446c11c4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/MicroserviceProxyControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -46,13 +46,13 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.MicroserviceProxyController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.service.MicroserviceProxyService;
-import org.openecomp.portalapp.portal.service.MicroserviceProxyServiceImpl;
-import org.openecomp.portalapp.util.EPUserUtils;
+import org.onap.portalapp.portal.controller.MicroserviceProxyController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.MicroserviceProxyService;
+import org.onap.portalapp.portal.service.MicroserviceProxyServiceImpl;
+import org.onap.portalapp.util.EPUserUtils;
import org.springframework.http.HttpStatus;
import org.springframework.web.client.HttpClientErrorException;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PolicyControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PolicyControllerTest.java
index 84b600be..9c1cbeeb 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PolicyControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PolicyControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
-
+package org.onap.portalapp.portal.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.BadRequestException;
import org.json.simple.JSONObject;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -50,35 +50,31 @@ import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.scheduler.SchedulerRestInterface;
-import org.openecomp.portalapp.portal.scheduler.policy.PolicyProperties;
-import org.openecomp.portalapp.portal.scheduler.policy.PolicyResponseWrapper;
-import org.openecomp.portalapp.portal.scheduler.policy.PolicyRestInterfaceFactory;
-import org.openecomp.portalapp.portal.scheduler.policy.PolicyRestInterfaceIfc;
-import org.openecomp.portalapp.portal.scheduler.policy.PolicyUtil;
-import org.openecomp.portalapp.portal.scheduler.policy.RestObject;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.scheduler.SchedulerProperties;
+import org.onap.portalapp.portal.scheduler.SchedulerRestInterface;
+import org.onap.portalapp.portal.scheduleraux.RestObject;
+import org.onap.portalapp.portal.scheduleraux.SchedulerAuxResponseWrapper;
+import org.onap.portalapp.portal.scheduleraux.SchedulerAuxRestInterfaceFactory;
+import org.onap.portalapp.portal.scheduleraux.SchedulerAuxRestInterfaceIfc;
+import org.onap.portalapp.portal.scheduleraux.SchedulerAuxUtil;
+import org.onap.portalsdk.core.web.support.UserUtils;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import junit.framework.Assert;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({ UserUtils.class, SystemProperties.class, PolicyProperties.class, PolicyRestInterfaceFactory.class,
- PolicyUtil.class })
+@PrepareForTest({ UserUtils.class, SchedulerProperties.class, SchedulerAuxRestInterfaceFactory.class,SchedulerAuxUtil.class })
public class PolicyControllerTest {
-
@Mock
SchedulerRestInterface schedulerRestInterface;
@InjectMocks
- PolicyController policyController = new PolicyController();
+ SchedulerAuxController policyController = new SchedulerAuxController();
@Before
public void setup() {
@@ -95,65 +91,58 @@ public class PolicyControllerTest {
@Before
public void setUp() {
- PowerMockito.mockStatic(SystemProperties.class);
- PowerMockito.mockStatic(PolicyProperties.class);
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_GET_CONFIG_VAL)).thenReturn("/api/getConfig");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_MECHID_VAL))
+ PowerMockito.mockStatic(SchedulerProperties.class);
+
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_GET_CONFIG_VAL)).thenReturn("/api/getConfig");
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_CLIENT_MECHID_VAL))
.thenReturn("m06814@controller.dcae.ecomp.att.com");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_PASSWORD_VAL))
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_CLIENT_PASSWORD_VAL))
.thenReturn("OBF:1ffu1qvu1t2z1l161fuk1i801nz91ro41xf71xfv1rqi1nx51i7y1fuq1kxw1t371qxw1fh0");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_USERNAME_VAL)).thenReturn("testpdp");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_PASSWORD_VAL))
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_USERNAME_VAL)).thenReturn("testpdp");
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_PASSWORD_VAL))
.thenReturn("OBF:1igd1kft1l1a1sw61svs1kxs1kcl1idt");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_ENVIRONMENT_VAL)).thenReturn("TEST");
- Mockito.when(SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL))
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_ENVIRONMENT_VAL)).thenReturn("TEST");
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_SERVER_URL_VAL))
.thenReturn("https://policypdp-conexus-e2e.ecomp.cci.att.com:8081/pdp");
}
- @SuppressWarnings({ "unchecked", "deprecation" })
+ @SuppressWarnings({ "unchecked" })
@Test
public void getPolicyInfoTest1() throws Exception {
JSONObject jsonObject = Mockito.mock(JSONObject.class);
- PowerMockito.mockStatic(PolicyRestInterfaceFactory.class);
- PowerMockito.mockStatic(SystemProperties.class);
- PolicyRestInterfaceIfc policyRestInterface = Mockito.mock(PolicyRestInterfaceIfc.class);
- PowerMockito.mockStatic(PolicyUtil.class);
+ PowerMockito.mockStatic(SchedulerAuxRestInterfaceFactory.class);
+ PowerMockito.mockStatic(SchedulerProperties.class);
+ SchedulerAuxRestInterfaceIfc policyRestInterface = Mockito.mock(SchedulerAuxRestInterfaceIfc.class);
+ PowerMockito.mockStatic(SchedulerAuxUtil.class);
// RestObject restObj=Mockito.mock(RestObject.class);
- PolicyResponseWrapper policyWrapper = Mockito.mock(PolicyResponseWrapper.class);
- PowerMockito.when(PolicyUtil.wrapResponse(Matchers.any(RestObject.class))).thenReturn(policyWrapper);
+ SchedulerAuxResponseWrapper policyWrapper = Mockito.mock(SchedulerAuxResponseWrapper.class);
+ PowerMockito.when(SchedulerAuxUtil.wrapResponse(Matchers.any(RestObject.class))).thenReturn(policyWrapper);
Mockito.when(policyWrapper.getResponse()).thenReturn("Success");
Mockito.when(policyWrapper.getStatus()).thenReturn(200);
- PowerMockito.when(PolicyRestInterfaceFactory.getInstance()).thenReturn(policyRestInterface);
+ PowerMockito.when(SchedulerAuxRestInterfaceFactory.getInstance()).thenReturn(policyRestInterface);
Mockito.doNothing().when(policyRestInterface).Post(Matchers.anyString(), Matchers.anyObject(),
Matchers.anyString(), Matchers.anyString(), Matchers.anyObject());
- ResponseEntity<String> responsePolicy = policyController.getPolicyInfo(mockedRequest, jsonObject);
+ ResponseEntity<String> responsePolicy = policyController.getPolicyInfo(mockedRequest);
Assert.assertEquals(responsePolicy.getStatusCode(), HttpStatus.OK);
}
@SuppressWarnings("unchecked")
- @Test(expected = Exception.class)
+ @Test
public void getPolicyInfoTestexpected() throws Exception {
JSONObject jsonObject = Mockito.mock(JSONObject.class);
- PowerMockito.mockStatic(PolicyRestInterfaceFactory.class);
- PowerMockito.mockStatic(SystemProperties.class);
- PolicyRestInterfaceIfc policyRestInterface = Mockito.mock(PolicyRestInterfaceIfc.class);
- PowerMockito.mockStatic(PolicyUtil.class);
- // RestObject restObj=Mockito.mock(RestObject.class);
- PolicyResponseWrapper policyWrapper = Mockito.mock(PolicyResponseWrapper.class);
- PowerMockito.when(PolicyUtil.wrapResponse(Matchers.any(RestObject.class))).thenReturn(policyWrapper);
- Mockito.when(policyWrapper.getResponse()).thenThrow(new BadRequestException());
- Mockito.when(policyWrapper.getStatus()).thenThrow(new BadRequestException());
+ PowerMockito.mockStatic(SchedulerAuxRestInterfaceFactory.class);
+ PowerMockito.mockStatic(SchedulerProperties.class);
+ Mockito.when(SchedulerProperties.getProperty(SchedulerProperties.SCHEDULERAUX_GET_CONFIG_VAL)).thenThrow(nullPointerException);
+ ResponseEntity<String> responsePolicy = policyController.getPolicyInfo(mockedRequest);
+ Assert.assertEquals(responsePolicy.getStatusCode(), HttpStatus.INTERNAL_SERVER_ERROR);
- PowerMockito.when(PolicyRestInterfaceFactory.getInstance()).thenReturn(policyRestInterface);
- Mockito.doNothing().when(policyRestInterface).Post(Matchers.anyString(), Matchers.anyObject(),
- Matchers.anyString(), Matchers.anyString(), Matchers.anyObject());
-
- policyController.getPolicyInfo(mockedRequest, jsonObject);
}
+
+
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PortalAdminControllerTest.java
index 142d5ff4..0c48f176 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/PortalAdminControllerTest.java
@@ -1,12 +1,13 @@
+
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -34,8 +35,7 @@
* ============LICENSE_END============================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.openecomp.portalapp.portal.controller;
+ */package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -52,19 +52,22 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.PortalAdminService;
-import org.openecomp.portalapp.portal.service.PortalAdminServiceImpl;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.PortalAdmin;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.service.AuditService;
-import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+import org.onap.portalapp.portal.controller.PortalAdminController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.exceptions.NoHealthyServiceException;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.PortalAdminService;
+import org.onap.portalapp.portal.service.PortalAdminServiceImpl;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.PortalAdmin;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.service.AuditService;
+import org.onap.portalsdk.core.service.AuditServiceImpl;
public class PortalAdminControllerTest extends MockitoTestSuite{
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java
new file mode 100644
index 00000000..e63ea438
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java
@@ -0,0 +1,525 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 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.onap.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.portalapp.controller.core.RoleController;
+import org.onap.portalapp.controller.core.RoleFunctionListController;
+import org.onap.portalapp.controller.core.RoleListController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.CentralV2RoleFunction;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.EPAppService;
+import org.onap.portalapp.portal.service.ExternalAccessRolesService;
+import org.onap.portalapp.portal.transport.CentralV2Role;
+import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.service.AuditService;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.servlet.ModelAndView;
+
+public class RoleManageControllerTest {
+
+ @Mock
+ RoleController roleController;
+
+ @Mock
+ RoleListController roleListController;
+
+ @Mock
+ RoleFunctionListController roleFunctionListController;
+
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService;
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService1 = null;
+
+ @InjectMocks
+ RoleManageController roleManageController = new RoleManageController();
+
+ @Mock
+ EPAppService appService;
+
+ @Mock
+ AuditService auditService;
+
+ @Mock
+ AdminRolesService adminRolesService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+
+ @Test
+ public void removeRoleRoleFunctionTest() throws Exception
+ {
+
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeRoleRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void addRoleRoRoleFunctionTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addRoleRoRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+
+ @Test
+ public void getRoleIfRoleIdNullTest() throws Exception
+ {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ CentralV2Role answer = new CentralV2Role();
+ Mockito.when(externalAccessRolesService.getRoleInfo((long) 1, "test")).thenReturn(answer);
+ List<CentralV2RoleFunction> finalRoleFunctionList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getRoleFuncList("test")).thenReturn(finalRoleFunctionList);
+ Mockito.when(externalAccessRolesService.getRolesForApp("test")).thenReturn(null);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.getRole(mockedRequest, mockedResponse, (long)1,null);
+
+}
+
+ @Test(expected = Exception.class)
+ public void getRoleExceptionTest() throws Exception
+ {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(mockApp());
+ CentralV2Role answer = new CentralV2Role();
+ Mockito.when(externalAccessRolesService.getRoleInfo((long) 1, "test")).thenReturn(answer);
+ Mockito.when(externalAccessRolesService.getRoleFuncList("test")).thenThrow(nullPointerException);
+ roleManageController.getRole(mockedRequest, mockedResponse, (long)1,null);
+
+}
+ @Test
+ public void getRoleIfRoleIdNotNullTest() throws Exception
+ {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ CentralV2Role answer = new CentralV2Role();
+ Mockito.when(externalAccessRolesService.getRoleInfo((long) 1, "test")).thenReturn(answer);
+ List<CentralV2RoleFunction> finalRoleFunctionList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getRoleFuncList("test")).thenReturn(finalRoleFunctionList);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ CentralV2Role currentRole = new CentralV2Role();
+ SortedSet<CentralV2Role> parentRoles = new TreeSet<>();
+ CentralV2Role centralV2Role = new CentralV2Role();
+ centralV2Role.setName("test");
+ parentRoles.add(centralV2Role);
+ currentRole.setParentRoles(parentRoles);
+ Mockito.when(externalAccessRolesService.getRoleInfo((long) 1, "test")).thenReturn(currentRole);
+ List<CentralV2Role> availableChildRoles = new ArrayList<>();
+ availableChildRoles.add(currentRole);
+ Mockito.when(externalAccessRolesService.getRolesForApp("test")).thenReturn(availableChildRoles);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.getRole(mockedRequest, mockedResponse, (long)1,(long)1);
+}
+
+ public EPApp mockApp()
+ {
+ EPApp app = new EPApp();
+
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+
+ }
+ @Test
+ public void getRolesTest() throws Exception {
+ EPApp app = mockApp();
+ app.setCentralAuth(true);
+ List<CentralV2Role> answer = new ArrayList<>();
+ Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp("test")).thenReturn(answer);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.getRoles(mockedRequest, mockedResponse, (long) 1);
+ }
+
+ @Test
+ public void getRolesExceptionTest() throws Exception {
+ EPApp app = CentralApp();
+ Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp("test")).thenThrow(new java.lang.Exception());
+ roleManageController.getRoles(mockedRequest, mockedResponse, (long) 1);
+
+ }
+
+ @Test
+ public void getRoleFunctionListTest() throws Exception {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ List<CentralV2RoleFunction> answer = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getRoleFuncList("test")).thenReturn(answer);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.getRoleFunctionList(mockedRequest, mockedResponse, (long) 1);
+ }
+
+ @Test(expected = Exception.class)
+ public void getRoleFunctionListExceptionTest() throws Exception {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(NonCentralApp());
+ roleManageController.getRoleFunctionList(mockedRequest, mockedResponse, (long) 1);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() throws Exception {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test");
+ CentralV2RoleFunction addNewFunc = new CentralV2RoleFunction();
+ addNewFunc.setCode("Test");
+ addNewFunc.setName("Test");
+ CentralV2RoleFunction roleFunction = mockCentralRoleFunction();
+ Mockito.when(externalAccessRolesService.getRoleFunction("Test", "test")).thenReturn(roleFunction);
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(Matchers.anyObject(), Matchers.anyObject()))
+ .thenReturn(true);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPUser> userList = new ArrayList<>();
+ userList.add(user);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ Mockito.when(externalAccessRolesService.getUser("guestT")).thenReturn(userList);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.saveRoleFunction(mockedRequest, mockedResponse, addNewFunc, (long) 1);
+ }
+
+ @Test
+ public void saveRoleFunctionExceptionTest() throws Exception {
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test");
+ CentralV2RoleFunction addNewFunc = new CentralV2RoleFunction();
+ addNewFunc.setCode("Test");
+ addNewFunc.setName("Test");
+ Mockito.when(externalAccessRolesService.getRoleFunction("Test", "test")).thenReturn(null);
+ roleManageController.saveRoleFunction(mockedRequest, mockedResponse, addNewFunc, (long) 1);
+ }
+
+ @Test
+ public void saveRoleFunctionIfAppNotCentralizedTest() throws Exception {
+ CentralV2RoleFunction addNewFunc = new CentralV2RoleFunction();
+ addNewFunc.setCode("Test");
+ addNewFunc.setName("Test");
+ Mockito.when(appService.getApp((long) 1)).thenReturn(NonCentralApp());
+ String roleFun = "{\"name\":\"Test\",\"code\":\"Test\"}";
+ roleManageController.saveRoleFunction(mockedRequest, mockedResponse, addNewFunc, (long) 1);
+ }
+
+ @Test
+ public void removeRoleFunctionTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ String roleFun = "{\"name\":\"Test\",\"code\":\"Test\"}";
+ CentralV2RoleFunction roleFunction = mockCentralRoleFunction();
+ Mockito.when(externalAccessRolesService.getRoleFunction("Test", "test")).thenReturn(roleFunction);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(Matchers.anyString(), Matchers.anyObject()))
+ .thenReturn(true);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.removeRoleFunction(mockedRequest, mockedResponse, roleFun, (long) 1);
+ }
+
+ @Test
+ public void removeRoleFunctionExceptionTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ String roleFun = "{\"name\":\"Test\",\"code\":\"Test\"}";
+ CentralV2RoleFunction roleFunction = mockCentralRoleFunction();
+ Mockito.when(externalAccessRolesService.getRoleFunction("Test", "test")).thenReturn(roleFunction);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(Matchers.anyString(), Matchers.anyObject()))
+ .thenReturn(false);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ roleManageController.removeRoleFunction(mockedRequest, mockedResponse, roleFun, (long) 1);
+ }
+
+ @Test
+ public void removeRoleFunctionIfAppNotCentralizedTest() throws Exception {
+ EPApp app = mockApp();
+ app.setCentralAuth(false);
+ Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+ String roleFun = "{\"name\":\"Test\",\"code\":\"Test\"}";
+ roleManageController.removeRoleFunction(mockedRequest, mockedResponse, roleFun, (long) 1);
+ }
+
+ @Test
+ public void syncRolesTest() throws Exception {
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(appService.getApp(1l)).thenReturn(app);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(Matchers.anyObject())).thenReturn(true);
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ PortalRestResponse<String> actual = roleManageController.syncRoles(mockedRequest, mockedResponse, 1l);
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<>();
+ portalRestResponse.setMessage("Sync roles completed successfully!");
+ portalRestResponse.setResponse("Success");
+ portalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ assertEquals(portalRestResponse, actual);
+ }
+
+ @Test
+ public void syncRolesException() throws Exception {
+ Mockito.when(appService.getAppDetailByAppName("test")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actual = roleManageController.syncRoles(mockedRequest, mockedResponse, 1l);
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<>();
+ portalRestResponse.setMessage(null);
+ portalRestResponse.setResponse("Failed");
+ portalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ assertEquals(portalRestResponse, actual);
+ }
+
+ @Test
+ public void syncRolesFunctionsTest() throws Exception {
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(appService.getApp(1l)).thenReturn(app);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(Matchers.anyObject())).thenReturn(true);
+ Mockito.doNothing().when(externalAccessRolesService).syncRoleFunctionFromExternalAccessSystem(app);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ PortalRestResponse<String> actual = roleManageController.syncFunctions(mockedRequest, mockedResponse, 1l);
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<>();
+ portalRestResponse.setMessage("Sync Functions completed successfully!");
+ portalRestResponse.setResponse("Success");
+ portalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ assertEquals(portalRestResponse, actual);
+ }
+
+ @Test
+ public void syncRolesFunctionsException() throws Exception {
+ Mockito.when(appService.getAppDetailByAppName("test")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actual = roleManageController.syncFunctions(mockedRequest, mockedResponse, 1l);
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<>();
+ portalRestResponse.setMessage(null);
+ portalRestResponse.setResponse("Failed");
+ portalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ assertEquals(portalRestResponse, actual);
+ }
+
+ @Test
+ public void addeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeRoleTest() throws Exception {
+ List<EPUser> epuserList = new ArrayList<>();
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(CentralApp());
+ EPUser user = mockUser.mockEPUser();
+ epuserList.add(user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp());
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ ExternalRequestFieldsValidator res = new ExternalRequestFieldsValidator(true, "success");
+ Mockito.when(externalAccessRolesService.deleteDependencyRoleRecord(Matchers.anyLong(), Matchers.anyString(),
+ Matchers.anyString())).thenReturn(res);
+ Mockito.when(externalAccessRolesService.getUser(Matchers.anyString())).thenReturn(epuserList);
+ Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList);
+ ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when( externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response);
+ Map<String, Object> expedtedResponse = new HashMap<String, Object>();
+ expedtedResponse.put("restCallStatus", " Unauthorized user");
+ Map<String, Object> actualResponse = roleManageController.removeRole(mockedRequest, mockedResponse, (long) 1, (long) 1);
+ assertEquals(actualResponse.size(), expedtedResponse.size());
+
+ }
+
+ @Test(expected = Exception.class)
+ public void removeRoleExceptionTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getApp((long) 1)).thenThrow(nullPointerException);
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ Mockito.when(mockedResponse.getWriter()).thenReturn(writer);
+ roleManageController.removeRole(mockedRequest, mockedResponse, (long) 1, (long) 1);
+ }
+
+ public CentralV2RoleFunction mockCentralRoleFunction()
+ {
+ CentralV2RoleFunction roleFunction = new CentralV2RoleFunction();
+ roleFunction.setCode("Test");
+ roleFunction.setName("Test");
+ roleFunction.setAppId((long) 1);
+ return roleFunction;
+ }
+
+ public EPApp CentralApp()
+ {
+ EPApp app = mockApp();
+ app.setCentralAuth(true);
+ app.setNameSpace("com.test");
+ return app;
+ }
+
+ public EPApp NonCentralApp()
+ {
+ EPApp app = mockApp();
+ app.setCentralAuth(false);
+ return app;
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RolesApprovalSystemControllerTest.java
index d7cdfe7a..281a0cbe 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RolesApprovalSystemControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -51,14 +51,14 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.RolesApprovalSystemController;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.UserRolesService;
-import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.onap.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.onap.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.onap.portalapp.portal.controller.RolesApprovalSystemController;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.UserRolesService;
+import org.onap.portalapp.portal.transport.ExternalRequestFieldsValidator;
public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SchedulerControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java
index 755ec51c..bafcb1c0 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SchedulerControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SchedulerControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -48,12 +48,13 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.scheduler.SchedulerProperties;
-import org.openecomp.portalapp.portal.scheduler.SchedulerRestInterface;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.onap.portalapp.portal.controller.SchedulerController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.scheduler.SchedulerProperties;
+import org.onap.portalapp.portal.scheduler.SchedulerRestInterface;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.web.support.UserUtils;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SessionCommunicationControllerTest.java
index e425e270..c991dede 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SessionCommunicationControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,23 +35,24 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
- package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.drools.core.command.assertion.AssertEquals;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.controller.sessionmgt.SessionCommunicationController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.service.sessionmgt.ManageService;
+import org.onap.portalapp.controller.sessionmgt.SessionCommunicationController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.service.sessionmgt.ManageService;
public class SessionCommunicationControllerTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestClient.java
index 8cf3e9c0..a6f0dcdc 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestClient.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import java.net.URI;
import java.security.cert.CertificateException;
@@ -94,7 +94,7 @@ public class SharedContextRestClient {
properties.getProperty(SharedContextTestProperties.SECURE, true), //
properties.getProperty(SharedContextTestProperties.UEBKEY), //
properties.getProperty(SharedContextTestProperties.USERNAME), //
- properties.getProperty(SharedContextTestProperties.PASSWORD), requestPath, //
+ properties.getProperty(SharedContextTestProperties.COUNTERSIGN), requestPath, //
contextId, //
contextKey);
}
@@ -203,7 +203,7 @@ public class SharedContextRestClient {
properties.getProperty(SharedContextTestProperties.SECURE, true), //
properties.getProperty(SharedContextTestProperties.UEBKEY), //
properties.getProperty(SharedContextTestProperties.USERNAME), //
- properties.getProperty(SharedContextTestProperties.PASSWORD), //
+ properties.getProperty(SharedContextTestProperties.COUNTERSIGN), //
requestPath, //
json);
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestControllerTest.java
index bdede7d1..05604fd0 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextRestControllerTest.java
@@ -1,12 +1,13 @@
+package org.onap.portalapp.portal.controller;
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +36,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-/*package org.openecomp.portalapp.portal.controller;
+
import java.io.IOException;
import java.util.HashMap;
@@ -45,15 +46,14 @@ import java.util.UUID;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Assert;
+import org.onap.portalapp.portal.controller.SharedContextRestClient;
+import org.onap.portalapp.portal.controller.SharedContextTestProperties;
import com.fasterxml.jackson.databind.ObjectMapper;
-*//**
- * Tests the endpoints exposed by the Shared Context REST controller in Portal
- * Core.
- *
- * @author clott
- *//*
+/**
+ * Tests the endpoints exposed by the Shared Context controller in Portal.
+ */
public class SharedContextRestControllerTest {
private final Log logger = LogFactory.getLog(getClass());
@@ -142,4 +142,3 @@ public class SharedContextRestControllerTest {
return response;
}
}
-*/
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextTestProperties.java
index 1c849420..49eae75b 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/SharedContextTestProperties.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import java.io.IOException;
import java.io.InputStream;
@@ -56,7 +56,7 @@ public class SharedContextTestProperties extends Properties {
public static final String RESTPATH = "restpath";
public static final String UEBKEY = "uebkey";
public static final String USERNAME = "username";
- public static final String PASSWORD = "password";
+ public static final String COUNTERSIGN = "countersign";
/**
* Expected on the classpath
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/TicketEventControllerTest.java
index ad696c2c..2b3598c4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/TicketEventControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -53,14 +53,15 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.TicketEventService;
-import org.openecomp.portalapp.portal.service.UserNotificationService;
-import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.onap.portalapp.portal.controller.TicketEventController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.TicketEventService;
+import org.onap.portalapp.portal.service.UserNotificationService;
+import org.onap.portalsdk.core.web.support.UserUtils;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserControllerTest.java
index b821b31a..205b2355 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -49,17 +49,17 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.UserController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.UserService;
-import org.openecomp.portalapp.portal.service.UserServiceImpl;
-import org.openecomp.portalapp.portal.transport.ProfileDetail;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalapp.portal.controller.UserController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.UserService;
+import org.onap.portalapp.portal.service.UserServiceImpl;
+import org.onap.portalapp.portal.transport.ProfileDetail;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -92,7 +92,7 @@ public class UserControllerTest extends MockitoTestSuite {
@Test
public void getLoggedinUserExceptionTest() {
- EPUser epUser = mockUser.mockEPUser();
+ EPUser epUser = null;
Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
expectedResponse.setMessage(null);
@@ -114,7 +114,7 @@ public class UserControllerTest extends MockitoTestSuite {
PortalRestStatusEnum enu = null;
expectedResponse.setStatus(enu.OK);
PowerMockito.mockStatic(CipherUtil.class);
- Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
+ Mockito.when(CipherUtil.decryptPKC(epUser.getLoginPwd())).thenReturn("Password");
PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
assertEquals(response.getMessage(), expectedResponse.getMessage());
assertEquals(response.getStatus(), expectedResponse.getStatus());
@@ -135,11 +135,9 @@ public class UserControllerTest extends MockitoTestSuite {
@Test
public void modifyLoggedinUserExceptionTest() {
- EPUser epUser = mockUser.mockEPUser();
-
+ EPUser epUser = null;
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
- expectedResponse.setMessage(
- "java.lang.ClassCastException: com.sun.crypto.provider.AESCipher$General cannot be cast to javax.crypto.CipherSpi");
+ expectedResponse.setMessage("java.lang.NullPointerException");
expectedResponse.setResponse(null);
PortalRestStatusEnum enu = null;
expectedResponse.setStatus(enu.ERROR);
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserNotificationControllerTest.java
index ff08d8a6..d829b60d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserNotificationControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -56,22 +56,22 @@ import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.UserNotificationController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
-import org.openecomp.portalapp.portal.service.UserNotificationService;
-import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;
-import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.onap.portalapp.portal.controller.UserNotificationController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.FunctionalMenuService;
+import org.onap.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.onap.portalapp.portal.service.UserNotificationService;
+import org.onap.portalapp.portal.service.UserNotificationServiceImpl;
+import org.onap.portalapp.portal.transport.EpNotificationItem;
+import org.onap.portalapp.portal.transport.EpNotificationItemVO;
+import org.onap.portalapp.portal.transport.FunctionalMenuRole;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.web.support.UserUtils;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserRolesControllerTest.java
index 138c207b..2897413e 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/UserRolesControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertEquals;
@@ -53,25 +53,25 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.UserRolesController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.EcompAuditLog;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.SearchService;
-import org.openecomp.portalapp.portal.service.UserRolesService;
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.service.AuditService;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.UserRolesController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.EcompAuditLog;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.SearchService;
+import org.onap.portalapp.portal.service.UserRolesService;
+import org.onap.portalapp.portal.transport.AppWithRolesForUser;
+import org.onap.portalapp.portal.transport.AppsListWithAdminRole;
+import org.onap.portalapp.portal.transport.FieldsValidator;
+import org.onap.portalapp.portal.transport.RoleInAppForUser;
+import org.onap.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.service.AuditService;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
index 43f40192..b65c442d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,9 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
+
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -50,16 +53,19 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
-import org.openecomp.portalapp.portal.service.AppsCacheService;
-import org.openecomp.portalapp.portal.service.AppsCacheServiceImple;
-import org.openecomp.portalapp.portal.transport.Analytics;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
-import org.openecomp.portalsdk.core.service.AuditService;
-import org.openecomp.portalsdk.core.service.AuditServiceImpl;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.controller.WebAnalyticsExtAppController;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.AdminRolesServiceImpl;
+import org.onap.portalapp.portal.service.AppsCacheService;
+import org.onap.portalapp.portal.service.AppsCacheServiceImple;
+import org.onap.portalapp.portal.transport.Analytics;
+import org.onap.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
+import org.onap.portalsdk.core.service.AuditService;
+import org.onap.portalsdk.core.service.AuditServiceImpl;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogControllerTest.java
new file mode 100644
index 00000000..50291f07
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogControllerTest.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 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.onap.portalapp.portal.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.portalapp.portal.controller.WidgetsCatalogController;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.WidgetCatalog;
+import org.onap.portalapp.portal.domain.WidgetServiceHeaders;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ConsulHealthService;
+import org.onap.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.onap.portalapp.portal.service.MicroserviceService;
+import org.onap.portalapp.portal.service.MicroserviceServiceImpl;
+import org.onap.portalapp.portal.service.WidgetParameterService;
+import org.onap.portalapp.portal.service.WidgetParameterServiceImpl;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+
+
+@Ignore
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class, EcompPortalUtils.class, SystemProperties.class, EPCommonSystemProperties.class})
+public class WidgetsCatalogControllerTest {
+
+ @Mock
+ ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+ @Mock
+ MicroserviceService microserviceService = new MicroserviceServiceImpl();
+
+ @Mock
+ WidgetParameterService widgetParameterService = new WidgetParameterServiceImpl();
+
+ @InjectMocks
+ WidgetsCatalogController widgetsCatalogController = new WidgetsCatalogController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ @Mock
+ WidgetServiceHeaders widgetServiceHeaders ;
+
+
+ @Mock
+ RestTemplate template = new RestTemplate();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Mock
+ HttpEntity mockHttpEntity;
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getUserWidgetCatalogTest() throws RestClientException, Exception{
+
+ String resourceType = null;
+ List<WidgetCatalog> widgets = new ArrayList<>();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(EcompPortalUtils.widgetMsProtocol()).thenReturn("test1");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WIDGET_MS_PROTOCOL)).thenReturn("https");
+// Mockito.when(WidgetServiceHeaders.getInstance()).thenReturn(HttpHeaders.ACCEPT);
+ Mockito.when(SystemProperties.getProperty("microservices.widget.local.port")).thenReturn("test");
+ Mockito.when(consulHealthService.getServiceLocation("widgets-service",
+ "test")).thenReturn("test.com");
+ Mockito.when(new HttpEntity(WidgetServiceHeaders.getInstance())).thenReturn(mockHttpEntity);
+// HttpEntity<String> entity = new HttpEntity<String>("helloWorld");
+// ResponseEntity<ArrayList> ans = new ResponseEntity<>(statusCode);
+// Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.GET),
+// Matchers.<HttpEntity<?>>any(), Matchers.eq(ArrayList.class))).thenReturn(ans);
+// List<WidgetCatalog> expectedWidgets = widgetsCatalogController.getUserWidgetCatalog(mockedRequest, mockedResponse, "guestT");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java
index 7f8d6a48..03031b40 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.controller;
+package org.onap.portalapp.portal.controller;
import static org.junit.Assert.assertTrue;
@@ -49,12 +49,14 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.service.ConsulHealthService;
-import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalapp.portal.controller.WidgetsCatalogMarkupController;
+import org.onap.portalapp.portal.domain.WidgetServiceHeaders;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.ConsulHealthService;
+import org.onap.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/shared-context-test.properties b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/shared-context-test.properties
new file mode 100644
index 00000000..56e5907e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/shared-context-test.properties
@@ -0,0 +1,28 @@
+###
+# ================================================================================
+# ECOMP Portal
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file 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.
+# ================================================================================
+###
+
+hostname= www.portal.onap.org
+# port = 80
+secure = true
+appname = ecompportal
+restpath = context
+uebkey = xgnLrmNmkfCRnIwa
+username = username
+countersign = pwd
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/MockEPUser.java
index 4cc471b0..c5235446 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/MockEPUser.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,11 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.core;
+package org.onap.portalapp.portal.core;
import java.util.Date;
-import org.openecomp.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.EPUser;
public class MockEPUser {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/PopulateSampleTestData.java
index 64a04892..e3eeaa54 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/PopulateSampleTestData.java
@@ -1,12 +1,13 @@
+package org.onap.portalapp.portal.core;
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,34 +36,50 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.lm;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.FileNotFoundException;
-
-import org.junit.Test;
-import org.openecomp.portalapp.lm.LicenseableClassImpl;
-
-public class LicenseableClassImplTest {
-
- @Test
- public void licenseableClassImplTest() throws FileNotFoundException{
- LicenseableClassImpl licenseableClassImpl = new LicenseableClassImpl();
-
- String appNameReturn = licenseableClassImpl.getApplicationName();
- java.io.InputStream inputStream = licenseableClassImpl.getPublicKeystoreAsInputStream();
- String aliasReturn = licenseableClassImpl.getAlias();
- String pswdReturn = licenseableClassImpl.getKeyPasswd();
- String pkPswd = licenseableClassImpl.getPublicKeystorePassword();
- String cpPswd = licenseableClassImpl.getCipherParamPassword();
-
- assertEquals(appNameReturn, "");
- assertEquals(inputStream, null);
- assertEquals(aliasReturn, "");
- assertEquals(pswdReturn, "");
- assertEquals(pkPswd, "");
- assertEquals(cpPswd, "");
-
- }
-}
+//package org.openecomp.portalapp.portal.core;
+//
+//import java.sql.Connection;
+//import java.sql.SQLException;
+//
+//import javax.sql.DataSource;
+//
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.jdbc.datasource.DataSourceUtils;
+//import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+//
+//public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// DataSource dataSource;
+//
+// @Before
+// public void populateTestData() throws SQLException {
+//
+// String sql = "PopulateTestData.sql";
+// createConnection(sql);
+// }
+//
+// public void createConnection(String sql) {
+// Connection connection = null;
+// ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+// populator.addScript(new ClassPathResource(sql));
+// try {
+// connection = DataSourceUtils.getConnection(dataSource);
+// populator.populate(connection);
+// } finally {
+// if (connection != null) {
+// DataSourceUtils.releaseConnection(connection, dataSource);
+// }
+// }
+// }
+//
+// @Test
+// public void populateTest() {
+// assert (true);
+// }
+//
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RemoveSampleTestData.java
index e3b3d8fe..1fa6c7d1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RemoveSampleTestData.java
@@ -1,12 +1,13 @@
+package org.onap.portalapp.portal.core;
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,64 +36,49 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import java.io.IOException;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InjectMocks;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.lm.LicenseableClassImpl;
-
-public class LicenseableClassImplTest {
-
- @InjectMocks
- LicenseableClassImpl licenseableClassImpl= new LicenseableClassImpl();
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- }
-
- @Test
- public void getApplicationNameTest()
- {
- assertEquals(licenseableClassImpl.getApplicationName(), "");
- }
- @Test
- public void getPublicKeystoreAsInputStreamTest() throws IOException
- {
- assertNull(licenseableClassImpl.getPublicKeystoreAsInputStream());
- }
- @Test
- public void getAliasTest()
- {
- assertEquals(licenseableClassImpl.getAlias(), "");
- }
- @Test
- public void getKeyPasswdTest()
- {
- assertEquals(licenseableClassImpl.getKeyPasswd(), "");
- }
- @Test
- public void getPublicKeystorePasswordTest()
- {
- assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
- }
- @Test
- public void getCipherParamPasswordTest()
- {
- assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
- }
- @Test
- public void getClassToLicenseTest()
- {
- assertEquals(licenseableClassImpl.getClassToLicense(), LicenseableClassImpl.class);
- }
-
-
-}
+//package org.openecomp.portalapp.portal.core;
+//
+//import java.sql.Connection;
+//import java.sql.SQLException;
+//
+//import javax.sql.DataSource;
+//
+//import org.junit.After;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.jdbc.datasource.DataSourceUtils;
+//import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+//
+//public class RemoveSampleTestData extends ApplicationCommonContextTestSuite {
+// @Autowired
+// DataSource dataSource;
+//
+// public static int count = 0;
+//
+// @After
+// public void removeTestData() throws SQLException {
+// String sql = "RemoveTestData.sql";
+// createConnection(sql);
+// }
+//
+// public void createConnection(String sql) {
+// Connection connection = null;
+// ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+// populator.addScript(new ClassPathResource(sql));
+// try {
+// connection = DataSourceUtils.getConnection(dataSource);
+// populator.populate(connection);
+// } finally {
+// if (connection != null) {
+// DataSourceUtils.releaseConnection(connection, dataSource);
+// }
+// }
+// }
+//
+// @Test
+// public void removeTest() {
+// assert (true);
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RestURLsTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RestURLsTestSuite.java
new file mode 100644
index 00000000..8bb21812
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/core/RestURLsTestSuite.java
@@ -0,0 +1,353 @@
+package org.onap.portalapp.portal.core;
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 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.portal.core;
+//
+//import static org.junit.Assert.assertEquals;
+//import static org.junit.Assert.assertTrue;
+//
+//import java.io.IOException;
+//import java.nio.charset.Charset;
+//import java.util.ArrayList;
+//
+//import org.junit.Assert;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.openecomp.portalapp.portal.domain.EPUser;
+//import org.openecomp.portalapp.portal.test.core.MockEPUser;
+//import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+//import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.springframework.http.MediaType;
+//import org.springframework.test.web.servlet.ResultActions;
+//import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+//import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+//
+//import com.fasterxml.jackson.annotation.JsonInclude;
+//import com.fasterxml.jackson.databind.ObjectMapper;
+//
+///**
+// *
+// * Use RestURLsTestSuite to test Rest API URL's
+// */
+//public class RestURLsTestSuite extends ApplicationCommonContextTestSuite {
+//
+// public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(MediaType.APPLICATION_JSON.getType(),
+// MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8"));
+//
+// String url = null;
+//
+// MockEPUser mockUser = new MockEPUser();
+//
+// public byte[] convertObjectToJsonBytes(Object object) throws IOException {
+// ObjectMapper mapper = new ObjectMapper();
+// mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+// return mapper.writeValueAsBytes(object);
+// }
+//
+// public void requestBuilder(String url) throws Exception {
+// EPUser user = mockUser.mockEPUser();
+//
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(url);
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// public void assertData(ResultActions ra) {
+// Assert.assertEquals("application/json", ra.andReturn().getResponse().getContentType());
+// Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+//
+// }
+//
+// @Test
+// public void getMenuItemsTest() throws Exception {
+// url = "/portalApi/functionalMenu";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForNotificationsTest() throws Exception {
+// url = "/portalApi/functionalMenuForNotificationTree";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getUserAppsTestnew() throws Exception {
+// url = "/portalApi/userApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getPersUserAppsTest() throws Exception {
+// url = "/portalApi/persUserApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppCatalogTest() throws Exception {
+// url = "/portalApi/appCatalog";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppListNewTest() throws Exception {
+// ResultActions ra = getMockMvc()
+// .perform(MockMvcRequestBuilders.get("/portalApi/userApplicationRoles").param("userId", "guest"));
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAvailableAppListTest() throws Exception {
+// url = "/portalApi/availableApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAllAppsTest() throws Exception {
+// url = "/portalApi/allAvailableApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getUserProfileTest() throws Exception {
+// url = "/portalApi/userProfile";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getRolesByAppTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/adminAppsRoles/550");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAppsWithAdminRoleStateForUserTest() throws Exception {
+// url = "/portalApi/adminAppsRoles?user=guest";
+// requestBuilder(url);
+//
+// }
+//
+// @Test
+// public void getUsersFromAppEndpointTest() throws Exception {
+// url = "/portalApi/app/550/users";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getOnboardingAppsTest() throws Exception {
+// url = "/portalApi/onboardingApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForAuthUserTest() throws Exception {
+// url = "/portalApi/functionalMenuForAuthUser";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForEditingTest() throws Exception {
+// url = "/portalApi/functionalMenuForEditing";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppRolesTest() throws Exception {
+// url = "/portalApi/appRoles/455";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void regenerateAncestorTableTest() throws Exception {
+//
+// EPUser user = mockUser.mockEPUser();
+//
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders
+// .get("/portalApi/regenerateFunctionalMenuAncestors");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertEquals("application/json;charset=UTF-8", ra.andReturn().getResponse().getContentType());
+// Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+//
+// }
+//
+// @Test
+// public void getAppListTest() throws Exception {
+// url = "/portalApi/getAppList";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getFavoritesForUserTest() throws Exception {
+// url = "/portalApi/getFavoriteItems";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getManifestTest() throws Exception {
+// url = "/portalApi/manifest";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getActiveUsersTest() throws Exception {
+// url = "/portalApi/dashboard/activeUsers";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void searchPortalTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/search")
+// .param("searchString", "guest");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getWidgetDataTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/widgetData")
+// .param("resourceType", "guest");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAppsAndContactsTest() throws Exception {
+// url = "/portalApi/contactus/allapps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getPortalDetailsTest() throws Exception {
+// url = "/portalApi/contactus/feedback";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppCategoryFunctionsTest() throws Exception {
+// url = "/portalApi/contactus/functions";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getOnlineUserUpdateRateTest() throws Exception {
+// url = "/portalApi/dashboard/onlineUserUpdateRate";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuIdRoleIdTest() throws Exception {
+// url = "/portalApi/getFunctionalMenuRole";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationsTest() throws Exception {
+// url = "/portalApi/getNotifications";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAdminNotificationsTest() throws Exception {
+// url = "/portalApi/getAdminNotifications";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationAppRolesTest() throws Exception {
+// url = "/portalApi/getNotificationAppRoles";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationUpdateRateTest() throws Exception {
+// url = "/portalApi/notificationUpdateRate";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void notificationReadTest() throws Exception {
+// url = "/portalApi/notificationRead?notificationId=262";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void testGetRolesTest() throws Exception {
+// url = "/portalApi/notificationRole/248/roles";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void putAppsWithAdminRoleStateForUserTest() throws Exception {
+//
+// AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();
+// appsListWithAdminRole.setOrgUserId("guest");
+// ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+// AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+// appNameIdIsAdmin.setId((long) 455);
+// appNameIdIsAdmin.setAppName("CCD");
+// appNameIdIsAdmin.setIsAdmin(true);
+// appNameIdIsAdmin.setRestrictedApp(false);
+// appsRoles.add(appNameIdIsAdmin);
+// appsListWithAdminRole.setAppsRoles(appsRoles);
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put("/portalApi/adminAppsRoles")
+// .contentType(APPLICATION_JSON_UTF8).content(convertObjectToJsonBytes(appsListWithAdminRole));
+//
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void ticketEventControllerForExternalSystem() throws Exception {
+// String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/auxapi/ticketevent")
+// .contentType(APPLICATION_JSON_UTF8).content(ticketEventJson);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertTrue(ra.andReturn().getResponse().getContentType().contains("application/json"));
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserAppTest.java
index c6160b2d..f93fe4a3 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserAppTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.AdminUserApp;
+import org.onap.portalapp.portal.domain.AdminUserApp;
public class AdminUserAppTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserApplicationsTest.java
index bf931a60..b01efb83 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AdminUserApplicationsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
@@ -43,8 +43,8 @@ import javax.persistence.Column;
import javax.persistence.Id;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.AdminUserApp;
-import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.onap.portalapp.portal.domain.AdminUserApp;
+import org.onap.portalapp.portal.domain.AdminUserApplications;
public class AdminUserApplicationsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AppContactUsTest.java
index 8043a9dc..ec24c6e4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/AppContactUsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.AppContactUs;
+import org.onap.portalapp.portal.domain.AppContactUs;
public class AppContactUsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralRoleFunctionTest.java
index fb0aee8e..d91ed842 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralRoleFunctionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.onap.portalapp.portal.transport.CentralRoleFunction;
public class CentralRoleFunctionTest {
@@ -48,11 +48,10 @@ public class CentralRoleFunctionTest {
CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- centralRoleFunction.setCode("test");
- centralRoleFunction.setName("test");
- centralRoleFunction.setAppId((long)1);
- centralRoleFunction.setEditUrl("test");
-
+ centralRoleFunction.setCode("test");
+ centralRoleFunction.setName("test");
+ centralRoleFunction.setId(null);
+ centralRoleFunction.setEditUrl("test");
return centralRoleFunction;
}
@@ -60,7 +59,7 @@ public class CentralRoleFunctionTest {
public void centralRoleFunctionTest(){
CentralRoleFunction centralRoleFunction = mockCentralRoleFunction();
- assertEquals(centralRoleFunction.getAppId(), new Long(1));
+ assertEquals(centralRoleFunction.getId(), null);
assertEquals(centralRoleFunction.getCode(), "test");
assertEquals(centralRoleFunction.getName(), "test");
assertEquals(centralRoleFunction.getEditUrl(), "test");
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralV2RoleFunctionTest.java
index ecdf415c..345f4576 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/CentralV2RoleFunctionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,32 +35,37 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.lm;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
-import java.util.Date;
-
import org.junit.Test;
-import org.openecomp.portalapp.lm.FusionLicenseManagerImpl;
-public class FusionLicenseManagerImplTest {
+public class CentralV2RoleFunctionTest {
+ public CentralV2RoleFunction mockCentralRoleFunction(){
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
+
+ centralV2RoleFunction.setCode("test");
+ centralV2RoleFunction.setName("test");
+ centralV2RoleFunction.setAppId((long)1);
+ centralV2RoleFunction.setEditUrl("test");
+ centralV2RoleFunction.setType("testType");
+ centralV2RoleFunction.setAction("testAction");
+
+ return centralV2RoleFunction;
+ }
+
@Test
- public void FusionLicenseManagerImplTest(){
- FusionLicenseManagerImpl fusionLicenseManagerImpl = new FusionLicenseManagerImpl();
-
- String nvlReturn = null;
+ public void centralRoleFunctionTest(){
+ CentralV2RoleFunction centralV2RoleFunction = mockCentralRoleFunction();
- int installLicenseInt = fusionLicenseManagerImpl.installLicense();
- nvlReturn = fusionLicenseManagerImpl.nvl("test");
- Date expiredDateReturn = fusionLicenseManagerImpl.getExpiredDate();
-
- assertEquals(installLicenseInt, 0);
- assertEquals(nvlReturn, null);
- assertEquals(expiredDateReturn, null);
-
+ assertEquals(centralV2RoleFunction.getAppId(), new Long(1));
+ assertEquals(centralV2RoleFunction.getCode(), "test");
+ assertEquals(centralV2RoleFunction.getName(), "test");
+ assertEquals(centralV2RoleFunction.getEditUrl(), "test");
+ assertEquals(centralV2RoleFunction.getAction(), "testAction");
+ assertEquals(centralV2RoleFunction.getType(), "testType");
}
-
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppRoleFunctionTest.java
index 0b46857c..cb936916 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppRoleFunctionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+import org.onap.portalapp.portal.domain.EPAppRoleFunction;
public class EPAppRoleFunctionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java
index 08383095..7537ccf2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPApp;
public class EPAppTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointAccountTest.java
index db407633..d01860af 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointAccountTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPEndpointAccount;
+import org.onap.portalapp.portal.domain.EPEndpointAccount;
public class EPEndpointAccountTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointTest.java
index 76cd5806..79915f25 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPEndpointTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPEndpoint;
+import org.onap.portalapp.portal.domain.EPEndpoint;
public class EPEndpointTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPRoleTest.java
index 891ad0eb..0b51b3d7 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.domain.EPRole;
public class EPRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppCatalogRolesTest.java
index 7090d495..e90f74fe 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppCatalogRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;
+import org.onap.portalapp.portal.domain.EPUserAppCatalogRoles;
public class EPUserAppCatalogRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java
index 93405f13..31efff3e 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,15 +35,15 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequest;
-import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequestDetail;
+import org.onap.portalapp.portal.domain.EPUserAppRolesRequest;
+import org.onap.portalapp.portal.domain.EPUserAppRolesRequestDetail;
public class EPUserAppRolesRequestDetailTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesTest.java
index eede33eb..98b2d7bf 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserAppRoles;
+import org.onap.portalapp.portal.domain.EPUserAppRoles;
public class EPUserAppRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java
index 1ab2f67e..72c5002d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.domain.EPUserApp;
public class EPUserAppTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java
index fdf864bb..2923eb2b 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,11 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserAppsManualSortPreference;
+import org.onap.portalapp.portal.domain.EPUserAppsManualSortPreference;
public class EPUserAppsManualSortPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java
index 9e608fdd..e2b49f0a 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserAppsSortPreference;
+import org.onap.portalapp.portal.domain.EPUserAppsSortPreference;
public class EPUserAppsSortPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserNotificationTest.java
index 88c02ae5..9aa9a37d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserNotificationTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUserNotification;
+import org.onap.portalapp.portal.domain.EPUserNotification;
public class EPUserNotificationTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserTest.java
index 1561cb87..cf1703d5 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.EPUser;
public class EPUserTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java
index 61054ab9..b4b4780d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPWidgetsManualSortPreference;
+import org.onap.portalapp.portal.domain.EPWidgetsManualSortPreference;
public class EPWidgetsManualSortPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleIdTest.java
index 3adfa236..96ebcb49 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleIdTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EcompAppRoleId;
+import org.onap.portalapp.portal.domain.EcompAppRoleId;
public class EcompAppRoleIdTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleTest.java
index 6b6dd67d..614588da 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EcompAppRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EcompAppRole;
+import org.onap.portalapp.portal.domain.EcompAppRole;
public class EcompAppRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalRoleDetailsTest.java
index 1220aa12..9c999aee 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalRoleDetailsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
@@ -43,8 +43,8 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
-import org.openecomp.portalapp.portal.domain.ExternalRoleDetails;
+import org.onap.portalapp.portal.domain.EPAppRoleFunction;
+import org.onap.portalapp.portal.domain.ExternalRoleDetails;
public class ExternalRoleDetailsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemAccessTest.java
index d5c964fc..e818e762 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemAccessTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;
+import org.onap.portalapp.portal.domain.ExternalSystemAccess;
public class ExternalSystemAccessTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java
index cfc6ab48..ace2dd83 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.onap.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
public class ExternalSystemRoleApprovalTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java
index 17a3c320..488bbd92 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.onap.portalapp.portal.domain.FunctionalMenuItemWithAppID;
public class FunctionalMenuItemWithAppIDTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/GetAccessResultIdTest.java
index b0cf94dd..5a05949f 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/GetAccessResultIdTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.GetAccessResultId;
+import org.onap.portalapp.portal.domain.GetAccessResultId;
public class GetAccessResultIdTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceDataTest.java
index c6681089..8f856391 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceDataTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,15 +35,15 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.MicroserviceData;
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+import org.onap.portalapp.portal.domain.MicroserviceData;
+import org.onap.portalapp.portal.domain.MicroserviceParameter;
public class MicroserviceDataTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceParameterTest.java
index 112fc0d6..a214738f 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/MicroserviceParameterTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+import org.onap.portalapp.portal.domain.MicroserviceParameter;
public class MicroserviceParameterTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserAppSelectionTest.java
index 1a06b05d..dd397b4d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserAppSelectionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+import org.onap.portalapp.portal.domain.PersUserAppSelection;
public class PersUserAppSelectionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserWidgetSelectionTest.java
index 10a4bcba..0b787152 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/PersUserWidgetSelectionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;
+import org.onap.portalapp.portal.domain.PersUserWidgetSelection;
public class PersUserWidgetSelectionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ResultTest.java
index cd558cfd..3cdfeeef 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/ResultTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.model.Result;
+import org.onap.portalapp.model.Result;
public class ResultTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/SharedContextTest.java
index da00649d..4c7b464e 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/SharedContextTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,14 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.SharedContext;
+import org.onap.portalapp.portal.domain.SharedContext;
public class SharedContextTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/UserIdRoleIdTest.java
index 10a1f21a..d391288d 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/UserIdRoleIdTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.UserIdRoleId;
+import org.onap.portalapp.portal.domain.UserIdRoleId;
public class UserIdRoleIdTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogParameterTest.java
index 101896a0..31d484d2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogParameterTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+import org.onap.portalapp.portal.domain.WidgetCatalogParameter;
public class WidgetCatalogParameterTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogTest.java
index 4c7844f3..ce90e49b 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetCatalogTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
@@ -44,9 +44,9 @@ import java.util.HashSet;
import java.util.Set;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.App;
-import org.openecomp.portalapp.portal.domain.RoleApp;
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.onap.portalapp.portal.domain.App;
+import org.onap.portalapp.portal.domain.RoleApp;
+import org.onap.portalapp.portal.domain.WidgetCatalog;
public class WidgetCatalogTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetParameterResultTest.java
index 65a984d8..354255bd 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetParameterResultTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.WidgetParameterResult;
+import org.onap.portalapp.portal.domain.WidgetParameterResult;
public class WidgetParameterResultTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetTest.java
index d9abd91d..3821c9cc 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/WidgetTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.domain;
+package org.onap.portalapp.portal.domain;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.domain.Widget;
+import org.onap.portalapp.portal.domain.Widget;
public class WidgetTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java
index f67b0e2d..62c75cfe 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.exceptions;
+package org.onap.portalapp.portal.exceptions;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+import org.onap.portalapp.portal.exceptions.NoHealthyServiceException;
public class NoHealthyServiceExceptionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/ApplicationCommonContextTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/ApplicationCommonContextTestSuite.java
new file mode 100644
index 00000000..764cebab
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/ApplicationCommonContextTestSuite.java
@@ -0,0 +1,191 @@
+package org.onap.portalapp.portal.framework;
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 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.portal.framework;
+//
+//import java.io.IOException;
+//
+//import org.junit.Before;
+//import org.junit.runner.RunWith;
+//import org.openecomp.portalsdk.core.conf.AppConfig;
+////import org.openecomp.portalapp.conf.ExternalAppConfig;
+////import org.openecomp.portalapp.conf.HibernateMappingLocations;
+//import org.openecomp.portalsdk.core.conf.HibernateConfiguration;
+//import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;
+//import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
+//import org.openecomp.portalsdk.core.util.CacheManager;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.ComponentScan;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.FilterType;
+//import org.springframework.context.annotation.Profile;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.core.io.Resource;
+//import org.springframework.test.context.ActiveProfiles;
+//import org.springframework.test.context.ContextConfiguration;
+//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+//import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+//import org.springframework.test.context.web.WebAppConfiguration;
+//import org.springframework.test.web.servlet.MockMvc;
+//import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+//import org.springframework.web.context.WebApplicationContext;
+//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+//
+///**
+// *
+// * In order to write a unit test, 1. inherit this class 2. place the "war"
+// * folder on your test class's classpath 3. run the test with the following VM
+// * argument; This is important because when starting the application from
+// * Container, the System Properties file (SystemProperties.java) can have the
+// * direct path but, when running from the Mock Junit container, the path should
+// * be prefixed with "classpath" to enable the mock container to search for the
+// * file in the classpath -Dcontainer.classpath="classpath:"
+// */
+//
+//@SuppressWarnings("deprecation")
+//@RunWith(SpringJUnit4ClassRunner.class)
+//@WebAppConfiguration
+//@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = { MockAppConfig.class })
+//@ActiveProfiles(value = "test")
+//public class ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// public WebApplicationContext wac;
+//
+// private MockMvc mockMvc;
+//
+// @Before
+// public void setup() {
+// if (mockMvc == null) {
+// this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+//
+// }
+// }
+//
+// public Object getBean(String name) {
+// return this.wac.getBean(name);
+// }
+//
+// public MockMvc getMockMvc() {
+// return mockMvc;
+// }
+//
+// public void setMockMvc(MockMvc mockMvc) {
+// this.mockMvc = mockMvc;
+// }
+//
+// public WebApplicationContext getWebApplicationContext() {
+// return wac;
+// }
+//
+//}
+//
+//@Configuration
+//@ComponentScan(basePackages = "org.openecomp", excludeFilters = {
+// // the following source configurations should not be scanned; instead of
+// // using Exclusion filter, we can use the @Profile annotation to exclude
+// // them
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.LogoutController*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.SDKLoginController*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalapp.conf.ExternalAppConfig*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.*.*InitUebHandler*") })
+//@Profile("test")
+//class MockAppConfig extends AppConfig {
+//
+// @Bean
+// HibernateMappingLocatable locatable() {
+// return new MockHibernateMappingLocations();
+// }
+//
+// @Bean
+// HibernateConfiguration hibConfiguration() {
+// return new HibernateConfiguration();
+// }
+//
+// @Bean
+// public SystemProperties systemProperties() {
+// return new MockSystemProperties();
+// }
+//
+// @Bean
+// public AbstractCacheManager cacheManager() {
+// return new CacheManager() {
+//
+// public void configure() throws IOException {
+//
+// }
+// };
+// }
+//
+// public String[] tileDefinitions() {
+// return new String[] { "classpath:/WEB-INF/fusion/defs/definitions.xml",
+// "classpath:/WEB-INF/defs/definitions.xml" };
+// }
+//
+// public void addInterceptors(InterceptorRegistry registry) {
+// // registry.addInterceptor(new
+// // SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+// // registry.addInterceptor(resourceInterceptor());
+// }
+//
+// public static class MockSystemProperties extends SystemProperties {
+//
+// public MockSystemProperties() {
+// }
+//
+// }
+//
+//}
+//
+//@Profile("test")
+//class MockHibernateMappingLocations implements HibernateMappingLocatable {
+//
+// public Resource[] getMappingLocations() {
+// return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),
+// new ClassPathResource("WEB-INF/fusion/orm/EP.hbm.xml"),
+// new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") };
+//
+// }
+//
+// public String[] getPackagesToScan() {
+// return new String[] { "org.openecomp", "src" };
+// }
+//
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/MockitoTestSuite.java
index 6ba142b1..84356f74 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/framework/MockitoTestSuite.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.framework;
+package org.onap.portalapp.portal.framework;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/listener/HealthMonitorTest.java
index 651f7f61..929c8e36 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/listener/HealthMonitorTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.listener;
+package org.onap.portalapp.portal.listener;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.onap.portalapp.portal.listener.HealthMonitor;
public class HealthMonitorTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCatalogItemTest.java
index b87deb2c..819262d1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCatalogItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.model;
+package org.onap.portalapp.portal.model;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.onap.portalapp.portal.ecomp.model.AppCatalogItem;
public class AppCatalogItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCategoryFunctionsItemTest.java
index 9c31aa45..346b427e 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppCategoryFunctionsItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.model;
+package org.onap.portalapp.portal.model;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.onap.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
public class AppCategoryFunctionsItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppContactUsItemTest.java
index effb0069..898bd986 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/AppContactUsItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.model;
+package org.onap.portalapp.portal.model;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.onap.portalapp.portal.ecomp.model.AppContactUsItem;
public class AppContactUsItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/SearchResultItemTest.java
index e9c3faae..fac3ecf6 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/model/SearchResultItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.model;
+package org.onap.portalapp.portal.model;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.onap.portalapp.portal.ecomp.model.SearchResultItem;
public class SearchResultItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java
index e80087e8..aaadbe03 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertEquals;
@@ -52,15 +52,15 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.AppContactUs;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
-import org.openecomp.portalapp.portal.service.AppContactUsService;
-import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.onap.portalapp.portal.domain.AppContactUs;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.onap.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AppContactUsService;
+import org.onap.portalapp.portal.service.AppContactUsServiceImpl;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
public class AppContactUsServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/DashboardSearchServiceImplTest.java
index 853ecbe0..13f04ae2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/DashboardSearchServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -53,13 +53,13 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
-import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.ecomp.model.SearchResultItem;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.onap.portalapp.portal.transport.CommonWidget;
+import org.onap.portalapp.portal.transport.CommonWidgetMeta;
+import org.onap.portalsdk.core.service.DataAccessService;
public class DashboardSearchServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java
index 072d6347..345ae3b7 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.*;
@@ -48,27 +48,31 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import org.apache.commons.codec.DecoderException;
import org.hibernate.SessionFactory;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalsdk.core.domain.RoleFunction;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.CentralV2RoleFunction;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.exceptions.RoleFunctionException;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
+import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
@PrepareForTest(SystemProperties.class)
+@Ignore
public class EPRoleFunctionServiceCentralizedImplTest {
@@ -92,12 +96,12 @@ public class EPRoleFunctionServiceCentralizedImplTest {
HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
- @Test
+ @Test(expected = NullPointerException.class)
public void getRoleFunctions()
{
- List<CentralRoleFunction> getRoleFuncList = new ArrayList<>();
- CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- getRoleFuncList.add(centralRoleFunction);
+ List<CentralV2RoleFunction> getRoleFuncList = new ArrayList<>();
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
+ getRoleFuncList.add(centralV2RoleFunction);
List<RoleFunction> getRoleFuncListOfPortal = new ArrayList<>();
RoleFunction roleFunction = new RoleFunction();
getRoleFuncListOfPortal.add(roleFunction);
@@ -109,7 +113,7 @@ public class EPRoleFunctionServiceCentralizedImplTest {
}
@Test
- public void getRoleFunctionsNewTest()
+ public void getRoleFunctionsNewTest() throws RoleFunctionException
{
HttpSession session = mockedRequest.getSession();
EPUser user = mockUser.mockEPUser();
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceImplTest.java
index 288b854f..b7bffea1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleFunctionServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.*;
@@ -56,15 +56,15 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceImpl;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.RoleFunction;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.EPRoleFunctionServiceImpl;
+import org.onap.portalapp.util.EPUserUtils;
+import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleServiceImplTest.java
index 1a2d76ca..4c97b6dd 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPRoleServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.*;
@@ -52,12 +52,12 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalsdk.core.domain.RoleFunction;
-import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.EPRoleServiceImpl;
+import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.service.DataAccessService;
public class EPRoleServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java
index f1103fbb..66cfdd31 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -57,21 +57,22 @@ import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.transport.EcompUserRoles;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.domain.Role;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.CentralV2RoleFunction;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPAppRoleFunction;
+import org.onap.portalapp.portal.domain.EPRole;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.exceptions.InactiveApplicationException;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.transport.EcompUserRoles;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -160,7 +161,7 @@ public class ExternalAccessRolesServiceImplTest {
// assertEquals(expectedApplicationRoles,applicationRoles);
// }
- @Test(expected = java.lang.Exception.class)
+ @Test
public void getAppExceptionTest() throws Exception {
List<EPApp> app = new ArrayList<>();
Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
@@ -169,23 +170,27 @@ public class ExternalAccessRolesServiceImplTest {
assertEquals(app, expectedapp);
}
- @Test(expected = java.lang.Exception.class)
- public void getAppTest() throws Exception {
+ @Test(expected = InactiveApplicationException.class)
+ public void getAppErrorTest() throws Exception {
List<EPApp> appList = new ArrayList<>();
EPApp app = mockApp();
appList.add(app);
- Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
- .thenReturn(appList);
- List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ final Map<String, String> appUebkeyParams = new HashMap<>();
+ appUebkeyParams.put("appKey", "test-ueb-key");
+ Mockito.when(dataAccessService1.executeNamedQuery("getMyAppDetailsByUebKey", appUebkeyParams, null))
+ .thenReturn(appList);
+ externalAccessRolesServiceImpl.getApp(uebKey);
}
@Test
- public void getAppErrorTest() throws Exception {
+ public void getAppTest() throws Exception {
List<EPApp> appList = new ArrayList<>();
EPApp app = mockApp();
app.setId((long) 1);
appList.add(app);
- Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ final Map<String, String> appUebkeyParams = new HashMap<>();
+ appUebkeyParams.put("appKey", "test-ueb-key");
+ Mockito.when(dataAccessService1.executeNamedQuery("getMyAppDetailsByUebKey", appUebkeyParams, null))
.thenReturn(appList);
List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
assertEquals(appList, expectedapp);
@@ -211,9 +216,14 @@ public class ExternalAccessRolesServiceImplTest {
EPRole ePRole = new EPRole();
role.setName("Test Role");
roleList.add(ePRole);
- Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ final Map<String, String> appUebkeyParams = new HashMap<>();
+ appUebkeyParams.put("appKey", "test-ueb-key");
+ Mockito.when(dataAccessService1.executeNamedQuery("getMyAppDetailsByUebKey", appUebkeyParams, null))
.thenReturn(appList);
- Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId() + " and app_id ="+app.getId(), null, null)).thenReturn(roleList);
+ final Map<String, Long> getPartnerAppRoleParams = new HashMap<>();
+ getPartnerAppRoleParams.put("appRoleId", role.getId());
+ getPartnerAppRoleParams.put("appId", app.getId());
+ Mockito.when(dataAccessService1.executeNamedQuery("getPartnerAppRoleByRoleId", getPartnerAppRoleParams, null)).thenReturn(roleList);
Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
.thenReturn("Testurl");
ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.CREATED);
@@ -243,18 +253,19 @@ public class ExternalAccessRolesServiceImplTest {
EPRole ePRole = new EPRole();
role.setName("Test Role");
roleList.add(ePRole);
- Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ final Map<String, String> appUebkeyParams = new HashMap<>();
+ appUebkeyParams.put("appKey", "test-ueb-key");
+ Mockito.when(dataAccessService1.executeNamedQuery("getMyAppDetailsByUebKey", appUebkeyParams, null))
.thenReturn(appList);
-
- Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId() + " and app_id ="+app.getId(), null, null)).thenReturn(roleList);
-// Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId(), null, null))
-// .thenReturn(roleList);
+ final Map<String, Long> getPartnerAppRoleParams = new HashMap<>();
+ getPartnerAppRoleParams.put("appRoleId", role.getId());
+ getPartnerAppRoleParams.put("appId", app.getId());
+ Mockito.when(dataAccessService1.executeNamedQuery("getPartnerAppRoleByRoleId", getPartnerAppRoleParams, null)).thenReturn(roleList);
Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
.thenReturn("Testurl");
ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.METHOD_NOT_ALLOWED);
Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.POST),
Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
-
assertFalse(externalAccessRolesServiceImpl.addRole(role, uebKey));
}
@@ -288,8 +299,8 @@ public class ExternalAccessRolesServiceImplTest {
EPApp app = mockApp();
params.put("functionCode", "menu_fun_code");
params.put("appId", String.valueOf(10));
- List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
- CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ List<CentralV2RoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralV2RoleFunction domainCentralRoleFunction = new CentralV2RoleFunction();
domainCentralRoleFunction.setCode("menu_fun_code");
centralRoleFunctionList.add(domainCentralRoleFunction);
Mockito.when(dataAccessService1.executeNamedQuery("getRoleFunction", params, null))
@@ -303,7 +314,7 @@ public class ExternalAccessRolesServiceImplTest {
Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
"app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
-
+
assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
}
@Test
@@ -312,8 +323,8 @@ public class ExternalAccessRolesServiceImplTest {
EPApp app = mockApp();
params.put("functionCode", "menu_fun_code");
params.put("appId", String.valueOf(10));
- List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
- CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ List<CentralV2RoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralV2RoleFunction domainCentralRoleFunction = new CentralV2RoleFunction();
domainCentralRoleFunction.setCode("menu_fun_code");
centralRoleFunctionList.add(domainCentralRoleFunction);
HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.NOT_FOUND);
@@ -329,7 +340,8 @@ public class ExternalAccessRolesServiceImplTest {
Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
"app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
- assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ boolean returnedValue = externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app);
+ assertTrue(returnedValue);
}
@Test
@@ -338,13 +350,13 @@ public class ExternalAccessRolesServiceImplTest {
EPApp app = mockApp();
params.put("functionCd", "menu_fun_code");
params.put("appId", String.valueOf(10));
- List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
- CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ List<CentralV2RoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralV2RoleFunction domainCentralRoleFunction = new CentralV2RoleFunction();
domainCentralRoleFunction.setCode("menu_fun_code");
centralRoleFunctionList.add(domainCentralRoleFunction);
Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params, null))
.thenThrow(nullPointerException);
- assertFalse(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
}
@Test
@@ -352,7 +364,9 @@ public class ExternalAccessRolesServiceImplTest {
List<EPUser> userList = new ArrayList<>();
EPUser user = mockUser.mockEPUser();
userList.add(user);
- Mockito.when(dataAccessService1.getList(EPUser.class, " where org_user_id = '" + "guestT" + "'", null, null))
+ final Map<String, String> userParams = new HashMap<>();
+ userParams.put("org_user_id", "guestT");
+ Mockito.when(dataAccessService1.executeNamedQuery("getEPUserByOrgUserId", userParams, null))
.thenReturn(userList);
List<EPUser> expectedUserList = externalAccessRolesServiceImpl.getUser("guestT");
assertEquals(expectedUserList, userList);
@@ -360,8 +374,8 @@ public class ExternalAccessRolesServiceImplTest {
public void saveCentralRoleFunctionTest() throws Exception {
- CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
- centralRoleFunction.setCode("menu_test");
+ CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction();
+ centralV2RoleFunction.setCode("menu_test");
EPApp app = mockApp();
app.setId((long) 1);
final Map<String, String> params = new HashMap<>();
@@ -370,8 +384,8 @@ public class ExternalAccessRolesServiceImplTest {
PowerMockito.mockStatic(EcompPortalUtils.class);
HttpHeaders headers = new HttpHeaders();
Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
- List<CentralRoleFunction> appRoleFunc = new ArrayList<>();
- appRoleFunc.add(centralRoleFunction);
+ List<CentralV2RoleFunction> appRoleFunc = new ArrayList<>();
+ appRoleFunc.add(centralV2RoleFunction);
Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params,
null)).thenReturn(appRoleFunc);
ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.OK);
@@ -394,7 +408,7 @@ public class ExternalAccessRolesServiceImplTest {
// }
- @Test
+ @Test(expected = IndexOutOfBoundsException.class)
public void getAllAppUsersTest() throws Exception
{
List<EPApp> expectedapps = new ArrayList<>();
@@ -425,4 +439,18 @@ public class ExternalAccessRolesServiceImplTest {
assertEquals(usersfinalList.get(0).getRoles().size(), 2);
}
+ @Test
+ public void getGlobalRolesOfPortalTest()
+ {
+ Mockito.when(dataAccessService1.executeNamedQuery("getGlobalRolesOfPortal", null, null)).thenReturn(null);
+ assertEquals(externalAccessRolesServiceImpl.getGlobalRolesOfPortal(), null);
+ }
+
+ @Test
+ public void getGlobalRolesOfPortalExceptionTest()
+ {
+ List<EPRole> globalRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.executeNamedQuery("getGlobalRolesOfPortal", null, null)).thenThrow(nullPointerException);
+ assertEquals(externalAccessRolesServiceImpl.getGlobalRolesOfPortal(), globalRoles);
+ }
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java
index 62a3f850..6655a5d1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertEquals;
@@ -49,15 +49,15 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.onap.portalapp.portal.service.FunctionalMenuService;
+import org.onap.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.onap.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.onap.portalapp.portal.transport.FunctionalMenuItem;
+import org.onap.portalapp.portal.transport.FunctionalMenuRole;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -194,7 +194,7 @@ public class FunctionalMenuMockServiceImplTest {
@Test
public void getFunctionalMenuItemDetailsTest(){
- Integer menuid = 1;
+ Long menuid = 1L;
String sql = "SELECT * FROM fn_menu_functional_roles WHERE menu_id = '1'";
FunctionalMenuItem actualResult = null;
FunctionalMenuItem expectedResult = null;
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuServiceImplTest.java
new file mode 100644
index 00000000..c954fcbd
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/FunctionalMenuServiceImplTest.java
@@ -0,0 +1,92 @@
+package org.onap.portalapp.portal.service;
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 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.portal.test.service;
+//
+//import static org.junit.Assert.assertTrue;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.junit.Test;
+//import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+//import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+//import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+//import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//
+//public class FunctionalMenuServiceImplTest extends ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// FunctionalMenuService functionalMenuService;
+//
+// @Test
+// public void getAppListTestService() throws Exception {
+//
+// String userId = "guestT";
+// List<BusinessCardApplicationRole> userAppRolesActualResult = null;
+//
+// List<BusinessCardApplicationRole> userAppRolesExpectedResult = new ArrayList<BusinessCardApplicationRole>();
+// BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+// businessCardApplicationRole.setAppName("ECOMP Portal");
+// businessCardApplicationRole.setRoleName("System Administrator");
+// userAppRolesExpectedResult.add(businessCardApplicationRole);
+// Map<String, String> params = new HashMap<String, String>();
+// params.put("userId", userId);
+// userAppRolesActualResult = functionalMenuService.getUserAppRolesList(userId);
+// assertTrue(userAppRolesActualResult.contains(businessCardApplicationRole));
+//
+// }
+//
+// @Test
+// public void getFunctionalMenuRoleTest() throws Exception {
+//
+// FunctionalMenuRole expectedFunctionalMenuRole = new FunctionalMenuRole();
+// expectedFunctionalMenuRole.setId(new Integer(-1));
+//
+// expectedFunctionalMenuRole.setMenuId((long) 137);
+// expectedFunctionalMenuRole.setAppId(new Integer(456));
+// expectedFunctionalMenuRole.setRoleId(new Integer(6214));
+// List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;
+// actualFunctionalMenuRoleList = functionalMenuService.getFunctionalMenuRole();
+// assertTrue(actualFunctionalMenuRoleList.contains(expectedFunctionalMenuRole));
+//
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/GetAccessServiceImplTest.java
index 4d887c47..70d99cc8 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/GetAccessServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertEquals;
@@ -50,12 +50,12 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.GetAccessResult;
-import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.GetAccessResult;
+import org.onap.portalapp.portal.service.GetAccessServiceImpl;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
public class GetAccessServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ManifestServiceImplTest.java
index 26973b99..0c066066 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ManifestServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import static org.junit.Assert.assertTrue;
@@ -52,7 +52,7 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+import org.onap.portalapp.portal.service.ManifestServiceImpl;
public class ManifestServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java
index 14e3f9f8..56104e82 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
import java.util.ArrayList;
import java.util.List;
@@ -49,16 +49,16 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.EPUserApp;
-import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
-import org.openecomp.portalapp.portal.service.UserRolesService;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.onap.portalapp.portal.core.MockEPUser;
+import org.onap.portalapp.portal.domain.EPApp;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.domain.EPUserApp;
+import org.onap.portalapp.portal.domain.PersUserAppSelection;
+import org.onap.portalapp.portal.framework.MockitoTestSuite;
+import org.onap.portalapp.portal.service.AdminRolesService;
+import org.onap.portalapp.portal.service.PersUserAppServiceImpl;
+import org.onap.portalapp.portal.service.UserRolesService;
+import org.onap.portalsdk.core.service.DataAccessService;
public class PersUserAppServiceImplTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AnalyticsTest.java
index ea37b921..e92f5cb4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AnalyticsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.Analytics;
+import org.onap.portalapp.portal.transport.Analytics;
public class AnalyticsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppCatalogPersonalizationTest.java
index d2c92864..2a512f71 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppCatalogPersonalizationTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
+import org.onap.portalapp.portal.transport.AppCatalogPersonalization;
public class AppCatalogPersonalizationTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppNameIdIsAdminTest.java
index cb52c50f..4287f3c1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppNameIdIsAdminTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.onap.portalapp.portal.transport.AppNameIdIsAdmin;
public class AppNameIdIsAdminTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppWithRolesForUserTest.java
index 1be7622e..da05ba36 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppWithRolesForUserTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import org.junit.Test;
+import org.onap.portalapp.portal.transport.AppWithRolesForUser;
+
import static org.junit.Assert.assertEquals;
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
public class AppWithRolesForUserTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppsListWithAdminRoleTest.java
index 0b0edc88..fdacc601 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/AppsListWithAdminRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,15 +35,15 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import java.util.ArrayList;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+import org.onap.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.onap.portalapp.portal.transport.AppsListWithAdminRole;
public class AppsListWithAdminRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
index 327060a9..7d22f04c 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.BulkUploadRoleFunction;
+import org.onap.portalapp.portal.transport.BulkUploadRoleFunction;
public class BulkUploadRoleFunctionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadUserRolesTest.java
index 5469ff62..14bd7edd 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BulkUploadUserRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.BulkUploadUserRoles;
+import org.onap.portalapp.portal.transport.BulkUploadUserRoles;
public class BulkUploadUserRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
index b01da14d..225df010 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.onap.portalapp.portal.transport.BusinessCardApplicationRole;
public class BusinessCardApplicationRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
index a6ecb2f9..c43361d3 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.onap.portalapp.portal.transport.BusinessCardApplicationRolesList;
public class BusinessCardApplicationRolesListTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralAppTest.java
index 69acdaa1..1dde2926 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralAppTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,48 +35,19 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.CentralApp;
+import org.onap.portalapp.portal.transport.CentralApp;
public class CentralAppTest {
public CentralApp mockCentralApp(){
CentralApp centralApp = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
"test", "test", "test", "test", null, "test", "test", "test", "test");
-
-
- /* public CentralApp(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
- String imageUrl, String description, String notes, String url, String alternateUrl, String restEndpoint,
- String mlAppName, String mlAppAdminId, String motsId, String appPassword, String open, String enabled,
- byte[] thumbnail, String username, String uebKey, String uebSecret, String uebTopicName)*/
-
- centralApp.setId((long)1);
- centralApp.setCreatedId((long)1);
- centralApp.setModifiedId((long)1);
- centralApp.setRowNum((long)1);
- centralApp.setName("test");
- centralApp.setImageUrl("test");
- centralApp.setDescription("test");
- centralApp.setNotes("test");
- centralApp.setUrl("test");
- centralApp.setAlternateUrl("test");
- centralApp.setRestEndpoint("test");
- centralApp.setMlAppName("test");
- centralApp.setMlAppAdminId("test");
- centralApp.setMotsId("test");
- centralApp.setAppPassword("test");
- centralApp.setOpen("test");
- centralApp.setEnabled("test");
- centralApp.setUsername("test");
- centralApp.setUebKey("test");
- centralApp.setUebSecret("test");
- centralApp.setUebTopicName("test");
-
- return centralApp;
+ return centralApp;
}
@Test
@@ -86,28 +57,6 @@ public class CentralAppTest {
CentralApp centralApp1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
"test", "test", "test", "test", null, "test", "test", "test", "test");
- /*centralApp1.setId((long)1);
- centralApp1.setCreatedId((long)1);
- centralApp1.setModifiedId((long)1);
- centralApp1.setRowNum((long)1);
- centralApp1.setName("test");
- centralApp1.setImageUrl("test");
- centralApp1.setDescription("test");
- centralApp1.setNotes("test");
- centralApp1.setUrl("test");
- centralApp1.setAlternateUrl("test");
- centralApp1.setRestEndpoint("test");
- centralApp1.setMlAppName("test");
- centralApp1.setMlAppAdminId("test");
- centralApp1.setMotsId("test");
- centralApp1.setAppPassword("test");
- centralApp1.setOpen("test");
- centralApp1.setEnabled("test");
- centralApp1.setUsername("test");
- centralApp1.setUebKey("test");
- centralApp1.setUebSecret("test");
- centralApp1.setUebTopicName("test");*/
-
assertEquals(centralApp.getId(), new Long(1));
assertEquals(centralApp.getCreatedId(), new Long(1));
assertEquals(centralApp.getModifiedId(), new Long(1));
@@ -132,8 +81,6 @@ public class CentralAppTest {
assertTrue(centralApp.equals(centralApp1));
assertEquals(centralApp.hashCode(), centralApp1.hashCode());
- /* assertTrue(centralApp.equals(new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
- "test", "test", "test", "test", null, "test", "test", "test", "test")));*/
}
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralRoleTest.java
index 0ec0a300..1c40be40 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -44,52 +44,52 @@ import org.junit.Test;
public class CentralRoleTest {
- public CentralRole mockCentralRole(){
- CentralRole centralRole = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ public CentralV2Role mockCentralRole(){
+ CentralV2Role centralV2Role = new CentralV2Role((long)1, null, null, (long)1, (long)1, (long)1,
"test", false, 1, null, null, null);
- centralRole.setId((long)1);
- centralRole.setCreatedId((long)1);
- centralRole.setModifiedId((long)1);
- centralRole.setRowNum((long)1);
- centralRole.setName("test");
- centralRole.setActive(false);
- centralRole.setPriority(1);
+ centralV2Role.setId((long)1);
+ centralV2Role.setCreatedId((long)1);
+ centralV2Role.setModifiedId((long)1);
+ centralV2Role.setRowNum((long)1);
+ centralV2Role.setName("test");
+ centralV2Role.setActive(false);
+ centralV2Role.setPriority(1);
- centralRole.setCreated(null);
- centralRole.setModified(null);
- centralRole.setRoleFunctions(null);
- centralRole.setChildRoles(null);
- centralRole.setParentRoles(null);
+ centralV2Role.setCreated(null);
+ centralV2Role.setModified(null);
+ centralV2Role.setRoleFunctions(null);
+ centralV2Role.setChildRoles(null);
+ centralV2Role.setParentRoles(null);
- return centralRole;
+ return centralV2Role;
}
@Test
public void centralRoleTest(){
- CentralRole centralRole = mockCentralRole();
+ CentralV2Role centralV2Role = mockCentralRole();
- CentralRole centralRole1 = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ CentralV2Role centralRole1 = new CentralV2Role((long)1, null, null, (long)1, (long)1, (long)1,
"test", false, 1, null, null, null);
- CentralRole centralRole2 = new CentralRole((long)1, "test");
+ CentralV2Role centralRole2 = new CentralV2Role((long)1, "test");
- assertEquals(centralRole.getId(), new Long(1));
- assertEquals(centralRole.getCreatedId(), new Long(1));
- assertEquals(centralRole.getModifiedId(), new Long(1));
- assertEquals(centralRole.getRowNum(), new Long(1));
- assertEquals(centralRole.getName(), "test");
- assertEquals(centralRole.isActive(), false);
- assertEquals(centralRole.getCreated(), null);
- assertEquals(centralRole.getModified(), null);
- assertEquals(centralRole.getRoleFunctions(), null);
- assertEquals(centralRole.getChildRoles(), null);
- assertEquals(centralRole.getParentRoles(), null);
- assertEquals(centralRole.getPriority().toString(), "1");
- assertEquals(centralRole.hashCode(), centralRole1.hashCode());
- assertTrue(centralRole.equals(centralRole1));
- assertEquals(centralRole, centralRole1);
- assertEquals(centralRole2, new CentralRole((long)1, "test"));
+ assertEquals(centralV2Role.getId(), new Long(1));
+ assertEquals(centralV2Role.getCreatedId(), new Long(1));
+ assertEquals(centralV2Role.getModifiedId(), new Long(1));
+ assertEquals(centralV2Role.getRowNum(), new Long(1));
+ assertEquals(centralV2Role.getName(), "test");
+ assertEquals(centralV2Role.isActive(), false);
+ assertEquals(centralV2Role.getCreated(), null);
+ assertEquals(centralV2Role.getModified(), null);
+ assertEquals(centralV2Role.getRoleFunctions(), null);
+ assertEquals(centralV2Role.getChildRoles(), null);
+ assertEquals(centralV2Role.getParentRoles(), null);
+ assertEquals(centralV2Role.getPriority().toString(), "1");
+ assertEquals(centralV2Role.hashCode(), centralRole1.hashCode());
+ assertTrue(centralV2Role.equals(centralRole1));
+ assertEquals(centralV2Role, centralRole1);
+ assertEquals(centralRole2, new CentralV2Role((long)1, "test"));
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserAppTest.java
index 9b4b5f8a..a04b47a6 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserAppTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,44 +35,44 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.CentralApp;
-import org.openecomp.portalapp.portal.transport.CentralRole;
-import org.openecomp.portalapp.portal.transport.CentralUserApp;
+import org.onap.portalapp.portal.transport.CentralApp;
+import org.onap.portalapp.portal.transport.CentralV2Role;
+import org.onap.portalapp.portal.transport.CentralV2UserApp;
public class CentralUserAppTest {
- public CentralUserApp mockCentralUserApp(){
- CentralUserApp centralUserApp = new CentralUserApp();
+ public CentralV2UserApp mockCentralUserApp(){
+ CentralV2UserApp centralV2UserApp = new CentralV2UserApp();
CentralApp app = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
"test", "test", "test", "test", null, "test", "test", "test", "test");
- CentralRole role = new CentralRole();
+ CentralV2Role role = new CentralV2Role();
- centralUserApp.setUserId((long)1);
- centralUserApp.setApp(app);
- centralUserApp.setRole(role);
- centralUserApp.setPriority((short) 123);
+ centralV2UserApp.setUserId((long)1);
+ centralV2UserApp.setApp(app);
+ centralV2UserApp.setRole(role);
+ centralV2UserApp.setPriority((short) 123);
- return centralUserApp;
+ return centralV2UserApp;
}
@Test
public void centralUserAppTest(){
- CentralUserApp centralUserApp = mockCentralUserApp();
+ CentralV2UserApp centralV2UserApp = mockCentralUserApp();
CentralApp app1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
"test", "test", "test", "test", null, "test", "test", "test", "test");
- CentralRole role1 = new CentralRole();
+ CentralV2Role role1 = new CentralV2Role();
- assertEquals(centralUserApp.getUserId(), new Long(1));
- assertEquals(centralUserApp.getPriority(), new Short((short) 123));
- assertEquals(centralUserApp.getApp(), app1);
- assertEquals(centralUserApp.getRole(), role1);
+ assertEquals(centralV2UserApp.getUserId(), new Long(1));
+ assertEquals(centralV2UserApp.getPriority(), new Short((short) 123));
+ assertEquals(centralV2UserApp.getApp(), app1);
+ assertEquals(centralV2UserApp.getRole(), role1);
}
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java
index aad881b2..67c6ee09 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/CentralUserTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
@@ -43,16 +43,16 @@ import java.util.HashSet;
import java.util.Set;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.CentralRole;
-import org.openecomp.portalapp.portal.transport.CentralUser;
-import org.openecomp.portalapp.portal.transport.CentralUserApp;
+import org.onap.portalapp.portal.transport.CentralV2Role;
+import org.onap.portalapp.portal.transport.CentralV2User;
+import org.onap.portalapp.portal.transport.CentralV2UserApp;
public class CentralUserTest {
- public CentralUser mockCentralUser(){
- Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
- Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
- CentralUser centralUser = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ public CentralV2User mockCentralUser(){
+ Set<CentralV2UserApp> userApps = new HashSet<CentralV2UserApp>();
+ Set<CentralV2Role> pseudoRoles = new HashSet<CentralV2Role>();
+ CentralV2User centralV2User = new CentralV2User((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
(long)1, "test", "test", "test", "test", "test",
"test", "test", (long)1, "test", "test", "test",
"test", "test", "test", "test", "test", "test", "test",
@@ -62,16 +62,16 @@ public class CentralUserTest {
"test", "test", "test", "test", null,
false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
- return centralUser;
+ return centralV2User;
}
@Test
public void centralRoleTest(){
- CentralUser centralUser = mockCentralUser();
+ CentralV2User centralV2User = mockCentralUser();
- Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
- Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
- CentralUser centralUser1 = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ Set<CentralV2UserApp> userApps = new HashSet<CentralV2UserApp>();
+ Set<CentralV2Role> pseudoRoles = new HashSet<CentralV2Role>();
+ CentralV2User centralV2User1 = new CentralV2User((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
(long)1, "test", "test", "test", "test", "test",
"test", "test", (long)1, "test", "test", "test",
"test", "test", "test", "test", "test", "test", "test",
@@ -82,8 +82,8 @@ public class CentralUserTest {
false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
- assertEquals(centralUser, centralUser1);
- assertEquals(centralUser.hashCode(), centralUser1.hashCode());
- assertTrue(centralUser.equals(centralUser1));
+ assertEquals(centralV2User, centralV2User1);
+ assertEquals(centralV2User.hashCode(), centralV2User1.hashCode());
+ assertTrue(centralV2User.equals(centralV2User1));
}
}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsManualPreferenceTest.java
index 0d4c09a1..e45ffacc 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsManualPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.onap.portalapp.portal.transport.EPAppsManualPreference;
public class EPAppsManualPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsSortPreferenceTest.java
index 693cd61e..84ae04a6 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPAppsSortPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.onap.portalapp.portal.transport.EPAppsSortPreference;
public class EPAppsSortPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
index 9dc739a8..5aad78ce 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.onap.portalapp.portal.transport.EPDeleteAppsManualSortPref;
public class EPDeleteAppsManualSortPrefTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
index 6bb70f71..31296cc4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EPUserAppCurrentRoles;
+import org.onap.portalapp.portal.transport.EPUserAppCurrentRoles;
public class EPUserAppCurrentRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
index 5b94b09e..ef50aef8 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.onap.portalapp.portal.transport.EPWidgetsSortPreference;
public class EPWidgetsSortPreferenceTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EcompUserAppRolesTest.java
index 4bfb98b2..c8b1fdd2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EcompUserAppRolesTest.java
@@ -1,12 +1,13 @@
+
/*-
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +20,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -34,13 +35,12 @@
* ============LICENSE_END============================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.openecomp.portalapp.portal.transport;
+ */package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EcompUserAppRoles;
+import org.onap.portalapp.portal.transport.EcompUserAppRoles;
public class EcompUserAppRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemExtVOTest.java
index 41a12f90..9f316865 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemExtVOTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EpNotificationItemExtVO;
+import org.onap.portalapp.portal.transport.EpNotificationItemExtVO;
public class EpNotificationItemExtVOTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemTest.java
index 2961a2de..7f80bc40 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -34,13 +34,12 @@
* ============LICENSE_END============================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.openecomp.portalapp.portal.transport;
+ */package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.onap.portalapp.portal.transport.EpNotificationItem;
public class EpNotificationItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemVOTest.java
index 9cf1458b..61bc86f9 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpNotificationItemVOTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,14 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
+import java.util.Date;
+
import org.junit.Test;
+import org.onap.portalapp.portal.transport.EpNotificationItemVO;
public class EpNotificationItemVOTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpRoleNotificationItemTest.java
index 6ebc0ff8..82592934 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/EpRoleNotificationItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+import org.onap.portalapp.portal.transport.EpRoleNotificationItem;
public class EpRoleNotificationItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
index 60f718c5..f4f36d93 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
@@ -43,7 +43,7 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessPermsDetail;
+import org.onap.portalapp.portal.transport.ExternalAccessPermsDetail;
public class ExternalAccessPermsDetailTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsTest.java
index e8a212d9..3392f2e6 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessPermsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+import org.onap.portalapp.portal.transport.ExternalAccessPerms;
public class ExternalAccessPermsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRolePermsTest.java
index 6bdcb3bd..5e78c9cf 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRolePermsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
-import org.openecomp.portalapp.portal.transport.ExternalAccessRolePerms;
+import org.onap.portalapp.portal.transport.ExternalAccessPerms;
+import org.onap.portalapp.portal.transport.ExternalAccessRolePerms;
public class ExternalAccessRolePermsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRoleTest.java
index 11ff44bc..cf00f2be 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessRole;
+import org.onap.portalapp.portal.transport.ExternalAccessRole;
public class ExternalAccessRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
index d332b60a..0229ece4 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,13 +35,13 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessUserRoleDetail;
-import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+import org.onap.portalapp.portal.transport.ExternalAccessUserRoleDetail;
+import org.onap.portalapp.portal.transport.ExternalRoleDescription;
public class ExternalAccessUserRoleDetailTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserTest.java
index 1c6a819a..81504056 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalAccessUser;
+import org.onap.portalapp.portal.transport.ExternalAccessUser;
public class ExternalAccessUserTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java
index f99f54f2..616f86a2 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+import org.onap.portalapp.portal.transport.ExternalRoleDescription;
public class ExternalRoleDescriptionTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuItemTest.java
index 15b27def..518c78d3 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuItemTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import java.util.ArrayList;
import java.util.List;
@@ -43,7 +43,7 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.onap.portalapp.portal.transport.FunctionalMenuItem;
public class FunctionalMenuItemTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java
index ea170e10..b48867c3 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.onap.portalapp.portal.transport.FunctionalMenuRole;
public class FunctionalMenuRoleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RemoteUserWithRolesTest.java
index c54bdf9e..aa2f48e0 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RemoteUserWithRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
@@ -43,8 +43,8 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.RemoteRole;
-import org.openecomp.portalapp.portal.transport.RemoteUserWithRoles;
+import org.onap.portalapp.portal.transport.RemoteRole;
+import org.onap.portalapp.portal.transport.RemoteUserWithRoles;
public class RemoteUserWithRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RoleInAppForUserTest.java
index 5348f686..51d18472 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/RoleInAppForUserTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.onap.portalapp.portal.transport.RoleInAppForUser;
public class RoleInAppForUserTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserApplicationRolesTest.java
index 625f0589..33596265 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserApplicationRolesTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,7 +35,7 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
@@ -43,8 +43,8 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.RemoteRole;
-import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
+import org.onap.portalapp.portal.transport.RemoteRole;
+import org.onap.portalapp.portal.transport.UserApplicationRoles;
public class UserApplicationRolesTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
index 2238bf98..3c8e6ce7 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
+import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle;
public class UserWithNameSurnameTitleTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
index 236990c8..77e9cdb3 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,12 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.transport;
+package org.onap.portalapp.portal.transport;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.openecomp.portalapp.portal.transport.WidgetCatalogPersonalization;
+import org.onap.portalapp.portal.transport.WidgetCatalogPersonalization;
public class WidgetCatalogPersonalizationTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/utils/EcompPortalUtilsTest.java
index 4a1e58b2..efc1dab1 100644
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/utils/EcompPortalUtilsTest.java
@@ -2,11 +2,11 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 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”);
+ * 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
*
@@ -19,7 +19,7 @@
* limitations under the License.
*
* Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * 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
*
@@ -35,11 +35,12 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.portalapp.portal.utils;
+package org.onap.portalapp.portal.utils;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.onap.portalapp.portal.utils.EcompPortalUtils;
public class EcompPortalUtilsTest {
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java
deleted file mode 100644
index 08cddd69..00000000
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java
+++ /dev/null
@@ -1,226 +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.portal.controller;
-
-import static org.junit.Assert.assertEquals;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.portalapp.controller.core.RoleController;
-import org.openecomp.portalapp.controller.core.RoleFunctionListController;
-import org.openecomp.portalapp.controller.core.RoleListController;
-import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-import org.openecomp.portalapp.portal.controller.RoleManageController;
-import org.openecomp.portalapp.portal.core.MockEPUser;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
-import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
-import org.springframework.web.servlet.ModelAndView;
-
-public class RoleManageControllerTest {
-
-
-
- @Mock
- RoleController roleController;
-
- @Mock
- RoleListController roleListController;
-
- @Mock
- RoleFunctionListController roleFunctionListController;
-
-
- @Mock
- ExternalAccessRolesService externalAccessRolesService;
-
- @Mock
- ExternalAccessRolesService externalAccessRolesService1 = null;
-
- @InjectMocks
- RoleManageController roleManageController = new RoleManageController();
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- }
-
-
- MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
-
- HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
- HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
- NullPointerException nullPointerException = new NullPointerException();
- MockEPUser mockUser = new MockEPUser();
-
- @Test
- public void toggleRoleTest()
- {
- PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
- portalRestResponse.setMessage("success");
- portalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- portalRestResponse.setStatus(portalRestStatusEnum.OK);
-
- PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
- assertEquals(portalRestResponse,expectedpPortalRestResponse);
-
- }
-
-// @Test
-// public void toggleRoleExceptionTest()
-// {
-// PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
-// portalRestResponse.setMessage("success");
-// portalRestResponse.setResponse(null);
-// PortalRestStatusEnum portalRestStatusEnum = null;
-// portalRestResponse.setStatus(portalRestStatusEnum.OK);
-// Mockito.doNothing().when(roleListController).toggleRole(mockedRequest, mockedResponse))).th
-// getRoleListController().toggleRole(request, response)
-//
-// PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
-// assertEquals(portalRestResponse,expectedpPortalRestResponse);
-//
-// }
- @Test
- public void removeRoleTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleListController.removeRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.removeRole(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-
- @Test
- public void saveRoleTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleController.saveRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.saveRole(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-
- @Test
- public void removeRoleRoleFunctionTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleController.removeRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.removeRoleRoleFunction(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-
- @Test
- public void addRoleRoRoleFunctionTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleController.addRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.addRoleRoRoleFunction(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-
- @Test
- public void removeChildRoleTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleController.removeChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.removeChildRole(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-
-
- @Test
- public void getRoleTest() throws Exception
- {
- Mockito.doNothing().when(roleController).getRole(mockedRequest, mockedResponse);
- roleManageController.getRole(mockedRequest, mockedResponse);
- }
-
- @Test
- public void getRolesTest() throws Exception
- {
- Mockito.doNothing().when(roleListController).getRoles(mockedRequest, mockedResponse);
- roleManageController.getRoles(mockedRequest, mockedResponse);
- }
-
- @Test
- public void getRoleFunctionListTest() throws Exception
- {
- Mockito.doNothing().when(roleFunctionListController).getRoleFunctionList(mockedRequest, mockedResponse);
- roleManageController.getRoleFunctionList(mockedRequest, mockedResponse);
- }
-
- @Test
- public void saveRoleFunctionTest() throws Exception
- {
- Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test");
- roleManageController.saveRoleFunction(mockedRequest, mockedResponse, "test");
- }
-
- @Test
- public void removeRoleFunctionTest() throws Exception
- {
- Mockito.doNothing().when(roleFunctionListController).removeRoleFunction(mockedRequest, mockedResponse, "test");
- roleManageController.removeRoleFunction(mockedRequest, mockedResponse, "test");
- }
-
- @Test
- public void syncRolesTest() throws Exception
- {
- EPApp app = new EPApp();
- Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
- roleManageController.syncRoles(app);
- }
-
-
- @Test
- public void addeChildRoleTest() throws Exception
- {
- ModelAndView modelandView = new ModelAndView("login.htm");
- Mockito.when(roleController.addChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
- ModelAndView expectedModelandView = roleManageController.addChildRole(mockedRequest, mockedResponse);
- assertEquals(expectedModelandView, modelandView);
- }
-}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
deleted file mode 100644
index 938d11fb..00000000
--- a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
+++ /dev/null
@@ -1,46 +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.
-###
-
-hostname= www.portal.onap.org
-# port = 80
-secure = true
-appname = ecompportal
-restpath = context
-uebkey = xgnLrmNmkfCRnIwa
-username = username
-password = password