From b130fd3158c537df1ce2cb1e5a7a86c3d7e0d2a7 Mon Sep 17 00:00:00 2001 From: DylanB95EST Date: Mon, 4 Apr 2022 13:09:22 +0100 Subject: Refactoring/ Adding Tests for Validation Refactored classes affected by validation Have added tests for anywhere where validation is used Have refactored the parse and sync modules validation to be validated at the public api method Issue-ID: CPS-322 Change-Id: I4989cfd03300fbdca41571d0aa2d0b96978858ba Signed-off-by: DylanB95EST --- .../java/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapper.java | 2 +- .../org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cps-ncmp-rest/src/main') diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapper.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapper.java index 4c8fafea5f..a9ec863d53 100644 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapper.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapper.java @@ -45,7 +45,7 @@ public interface NcmpRestInputMapper { nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.SET_TO_DEFAULT) DmiPluginRegistration toDmiPluginRegistration(final RestDmiPluginRegistration restDmiPluginRegistration); - @Mapping(source = "cmHandle", target = "cmHandleID") + @Mapping(source = "cmHandle", target = "cmHandleId") @Mapping(source = "cmHandleProperties", target = "dmiProperties") @Mapping(source = "publicCmHandleProperties", target = "publicProperties") NcmpServiceCmHandle toNcmpServiceCmHandle(final RestInputCmHandle restInputCmHandle); diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java index 84fcd88a96..5c1f8704da 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java @@ -292,7 +292,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { private RestOutputCmHandle toRestOutputCmHandle(final NcmpServiceCmHandle ncmpServiceCmHandle) { final RestOutputCmHandle restOutputCmHandle = new RestOutputCmHandle(); final CmHandlePublicProperties cmHandlePublicProperties = new CmHandlePublicProperties(); - restOutputCmHandle.setCmHandle(ncmpServiceCmHandle.getCmHandleID()); + restOutputCmHandle.setCmHandle(ncmpServiceCmHandle.getCmHandleId()); cmHandlePublicProperties.add(ncmpServiceCmHandle.getPublicProperties()); restOutputCmHandle.setPublicCmHandleProperties(cmHandlePublicProperties); return restOutputCmHandle; -- cgit 1.2.3-korg