Code Review
/
portal
/
ric-dashboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade xapp manager to spec 0.1.3
[portal/ric-dashboard.git]
/
xapp-mgr-client
/
src
/
test
/
java
/
org
/
oransc
/
ric
/
portal
/
dashboard
/
xappmgr
/
client
/
test
/
XappManagerClientTest.java
diff --git
a/xapp-mgr-client/src/test/java/org/oransc/ric/portal/dashboard/xappmgr/client/test/XappManagerClientTest.java
b/xapp-mgr-client/src/test/java/org/oransc/ric/portal/dashboard/xappmgr/client/test/XappManagerClientTest.java
index
9a310bc
..
13daf05
100644
(file)
--- a/
xapp-mgr-client/src/test/java/org/oransc/ric/portal/dashboard/xappmgr/client/test/XappManagerClientTest.java
+++ b/
xapp-mgr-client/src/test/java/org/oransc/ric/portal/dashboard/xappmgr/client/test/XappManagerClientTest.java
@@
-1,6
+1,6
@@
/*-
* ========================LICENSE_START=================================
/*-
* ========================LICENSE_START=================================
- * O
RAN-O
SC
+ * O
-RAN-
SC
* %%
* Copyright (C) 2019 AT&T Intellectual Property and Nokia
* %%
* %%
* Copyright (C) 2019 AT&T Intellectual Property and Nokia
* %%
@@
-20,7
+20,8
@@
package org.oransc.ric.portal.dashboard.xappmgr.client.test;
import org.junit.jupiter.api.Test;
package org.oransc.ric.portal.dashboard.xappmgr.client.test;
import org.junit.jupiter.api.Test;
-import org.oransc.ric.xappmgr.client.api.DefaultApi;
+import org.oransc.ric.xappmgr.client.api.HealthApi;
+import org.oransc.ric.xappmgr.client.api.XappApi;
import org.oransc.ric.xappmgr.client.invoker.ApiClient;
import org.oransc.ric.xappmgr.client.model.AllXapps;
import org.oransc.ric.xappmgr.client.model.Xapp;
import org.oransc.ric.xappmgr.client.invoker.ApiClient;
import org.oransc.ric.xappmgr.client.model.AllXapps;
import org.oransc.ric.xappmgr.client.model.Xapp;
@@
-30,10
+31,6
@@
import org.springframework.web.client.RestClientException;
* Demonstrates use of the generated xApp manager client.
*
* The test fails because no server is available.
* Demonstrates use of the generated xApp manager client.
*
* The test fails because no server is available.
- *
- * The ugly name "DefaultApi" is generated because the spec lacks appropriate
- * tags on the operation, also see
- * https://stackoverflow.com/questions/38293236/swagger-swagger-codegen-maven-plugin-generate-default-api-interface
*/
public class XappManagerClientTest {
*/
public class XappManagerClientTest {
@@
-41,15
+38,16
@@
public class XappManagerClientTest {
public void demo() {
ApiClient apiClient = new ApiClient();
apiClient.setBasePath("http://localhost:30099/");
public void demo() {
ApiClient apiClient = new ApiClient();
apiClient.setBasePath("http://localhost:30099/");
- DefaultApi apiInstance = new DefaultApi(apiClient);
try {
try {
- apiInstance.getHealth();
- System.out.println("getHealth answered: " + apiClient.getStatusCode().toString());
+ HealthApi healthApi = new HealthApi(apiClient);
+ healthApi.getHealthAlive();
+ System.out.println("getHealthAlive answered: " + apiClient.getStatusCode().toString());
} catch (RestClientException e) {
} catch (RestClientException e) {
- System.err.println("getHealth failed: " + e.toString());
+ System.err.println("getHealth
Alive
failed: " + e.toString());
}
try {
}
try {
- AllXapps allXapps = apiInstance.getAllXapps();
+ XappApi xappApi = new XappApi(apiClient);
+ AllXapps allXapps = xappApi.getAllXapps();
System.out.println("getAllXapps answered: " + apiClient.getStatusCode().toString());
System.out.println("xApp count: " + allXapps.size());
for (Xapp x : allXapps)
System.out.println("getAllXapps answered: " + apiClient.getStatusCode().toString());
System.out.println("xApp count: " + allXapps.size());
for (Xapp x : allXapps)