diff options
author | Luji7 <lu.ji3@zte.com.cn> | 2017-10-27 22:31:21 +0800 |
---|---|---|
committer | Luji7 <lu.ji3@zte.com.cn> | 2017-10-27 22:31:26 +0800 |
commit | a3c2bbdf70af7e9c798ae6a285522c5b0a460be7 (patch) | |
tree | 0d0300f8cbc0a1f98be57457473d44e1e534ed1c | |
parent | 1e2cf68189a8b1c5526ec8c5a6fe5b7beae6a919 (diff) |
Fix service instance response parse failed.
Change-Id: I4028ac1ff3d62277470150bb6c880c667e6e1831
Issue-id: USECASEUI-53
Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
2 files changed, 16 insertions, 7 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/vfc/beans/DistributionResult.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/vfc/beans/DistributionResult.java index 6e1ce060..59818966 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/vfc/beans/DistributionResult.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/vfc/beans/DistributionResult.java @@ -26,21 +26,27 @@ public class DistributionResult { private String errorCode; - public DistributionResult(String status, String statusDescription, String errorCode) { - this.status = status; - this.statusDescription = statusDescription; - this.errorCode = errorCode; - } - public String getStatus() { return status; } + public void setStatus(String status) { + this.status = status; + } + public String getStatusDescription() { return statusDescription; } + public void setStatusDescription(String statusDescription) { + this.statusDescription = statusDescription; + } + public String getErrorCode() { return errorCode; } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } } diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java index 56a2377a..e156d337 100644 --- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java +++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java @@ -101,7 +101,10 @@ public class DefaultPackageDistributionServiceTest { public void itCanPostNsPackageToVFC() { VfcService vfcService = mock(VfcService.class); Csar csar = new Csar(); - DistributionResult result = new DistributionResult("status", "description", "errorcode"); + DistributionResult result = new DistributionResult(); + result.setStatus("status"); + result.setStatusDescription("description"); + result.setErrorCode("errorcode"); when(vfcService.distributeNsPackage(csar)).thenReturn(successfulCall(result)); PackageDistributionService service = new DefaultPackageDistributionService(null, vfcService); |