fixes for supporting non-gui application access provisioning
[portal.git] / ecomp-portal-BE-common / src / test / java / org / onap / portalapp / service / sessionmgt / SessionCommunicationTest.java
index 708f446..5cb61b2 100644 (file)
@@ -82,13 +82,13 @@ public class SessionCommunicationTest {
                app.setUebKey("test");
                app.setUebSecret("test");
                app.setUebTopicName("test");
-               app.isCentralAuth = true;
-               app.isEnabled = true;
-               app.isOpen =false;
-               app.name = "test";
-               app.restUrl ="http://localhost:1234";
-               app.username = "test";
-               app.appPassword = "xyz";
+               app.setRolesInAAF(true);
+               app.setIsEnabled(true);
+               app.setIsOpen(false);
+               app.setAppName("test");
+               app.setRestUrl("http://localhost:1234");
+               app.setAppBasicAuthUsername("test");
+               app.setAppBasicAuthPassword("xyz");
                URL u = PowerMockito.mock(URL.class);
                HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class);
                String url = "http://localhost:1234/sessionTimeOuts";
@@ -106,16 +106,16 @@ public class SessionCommunicationTest {
                app.setUebKey("test");
                app.setUebSecret("test");
                app.setUebTopicName("test");
-               app.isCentralAuth = true;
-               app.isEnabled = true;
-               app.isOpen =false;
-               app.name = "test";
-               app.restUrl ="http://localhost:1234";
-               app.username = "test";
-               app.appPassword = "";
+               app.setRolesInAAF(true);
+               app.setIsEnabled(true);
+               app.setIsOpen(false);
+               app.setAppName("test");
+               app.setRestUrl("http://localhost:1234");
+               app.setAppBasicAuthUsername("test");
+               app.setAppBasicAuthPassword("");
                EPApp epApp = new EPApp();
-               epApp.setUsername("test");
-               epApp.setAppPassword("xyz1234");
+               epApp.setAppBasicAuthUsername("test");
+               epApp.setAppBasicAuthPassword("xyz1234");
                PowerMockito.mockStatic(CipherUtil.class);
                PowerMockito.when(CipherUtil.decryptPKC(Matchers.anyString(),Matchers.anyString())).thenReturn("test");
                Mockito.when(appsCacheService.getApp(1L)).thenReturn(epApp);
@@ -136,13 +136,13 @@ public class SessionCommunicationTest {
                app.setUebKey("test");
                app.setUebSecret("test");
                app.setUebTopicName("test");
-               app.isCentralAuth = true;
-               app.isEnabled = true;
-               app.isOpen =false;
-               app.name = "test";
-               app.restUrl ="http://localhost:1234";
-               app.username = "test";
-               app.appPassword = "xyz";
+               app.setRolesInAAF(true);
+               app.setIsEnabled(true);
+               app.setIsOpen(false);
+               app.setAppName("test");
+               app.setRestUrl("http://localhost:1234");
+               app.setAppBasicAuthUsername("test");
+               app.setAppBasicAuthPassword("xyz");
                URL u = PowerMockito.mock(URL.class);
                HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class);
                String url = "http://localhost:1234/sessionTimeOuts";
@@ -161,13 +161,13 @@ public class SessionCommunicationTest {
                app.setUebKey("test");
                app.setUebSecret("test");
                app.setUebTopicName("test");
-               app.isCentralAuth = true;
-               app.isEnabled = true;
-               app.isOpen =false;
-               app.name = "test";
-               app.restUrl ="http://localhost:1234";
-               app.username = "test";
-               app.appPassword = "xyz";
+               app.setRolesInAAF(true);
+               app.setIsEnabled(true);
+               app.setIsOpen(false);
+               app.setAppName("test");
+               app.setRestUrl("http://localhost:1234");
+               app.setAppBasicAuthUsername("test");
+               app.setAppBasicAuthPassword("xyz");
                URL u = PowerMockito.mock(URL.class);
                HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class);
                String url = "http://localhost:1234/sessionTimeOuts";