X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2Fyangmodels%2FYangModelCmHandleSpec.groovy;h=cfc6ffda19f45ac08ae3a54b15755d5db1678cb3;hb=a927b20ce1a6d5792ed41e0a98eb475606e8f35a;hp=493db8c160a433ed34def64708d49a33d52e44a2;hpb=215b40aecaefdd8b523ea6ef72b14011adba3490;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/yangmodels/YangModelCmHandleSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/yangmodels/YangModelCmHandleSpec.groovy index 493db8c16..cfc6ffda1 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/yangmodels/YangModelCmHandleSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/yangmodels/YangModelCmHandleSpec.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021-2023 Nordix Foundation + * Copyright (C) 2021-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,12 +47,13 @@ class YangModelCmHandleSpec extends Specification { .withOperationalDataStores(DataStoreSyncState.SYNCHRONIZED, 'some-sync-time').build() ncmpServiceCmHandle.setCompositeState(compositeState) when: 'it is converted to a yang model cm handle' - def objectUnderTest = YangModelCmHandle.toYangModelCmHandle('', '', '', ncmpServiceCmHandle,'my-module-set-tag', 'my-alternate-id') + def objectUnderTest = YangModelCmHandle.toYangModelCmHandle('', '', '', ncmpServiceCmHandle,'my-module-set-tag', 'my-alternate-id', 'my-data-producer-identifier') then: 'the result has the right size' assert objectUnderTest.dmiProperties.size() == 1 - and: 'the result has the correct values for module set tag and alternate ID' + and: 'the result has the correct values for module set tag, alternate ID, and data producer identifier' assert objectUnderTest.moduleSetTag == 'my-module-set-tag' assert objectUnderTest.alternateId == 'my-alternate-id' + assert objectUnderTest.dataProducerIdentifier == 'my-data-producer-identifier' and: 'the DMI property in the result has the correct name and value' assert objectUnderTest.dmiProperties[0].name == 'myDmiProperty' assert objectUnderTest.dmiProperties[0].value == 'value1' @@ -67,7 +68,7 @@ class YangModelCmHandleSpec extends Specification { def 'Resolve DMI service name: #scenario and #requiredService service require.'() { given: 'a yang model cm handle' def objectUnderTest = YangModelCmHandle.toYangModelCmHandle(dmiServiceName, dmiDataServiceName, - dmiModelServiceName, new NcmpServiceCmHandle(cmHandleId: 'cm-handle-id-1'),'', '') + dmiModelServiceName, new NcmpServiceCmHandle(cmHandleId: 'cm-handle-id-1'),'', '', '') expect: assert objectUnderTest.resolveDmiServiceName(requiredService) == expectedService where: