diff options
Diffstat (limited to 'appc-config/appc-data-services/provider/src')
-rw-r--r-- | appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java index e5c5149f3..776acda64 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java @@ -1,3 +1,26 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Modification Copyright (C) 2018 IBM. + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END========================================================= + */ + package org.onap.appc.data.services.node; import static org.junit.Assert.assertEquals; @@ -120,7 +143,16 @@ public class ConfigResourceNodeTest { ConfigResourceNode configResourceNode = new ConfigResourceNode(dbServiceMock); configResourceNode.getTemplate(inParams, contextMock); - + verify(contextMock).setAttribute(anyString(), eq(AppcDataServiceConstant.OUTPUT_STATUS_SUCCESS)); + } + + @Test + public void testGetVnfcReference() throws Exception { + DGGeneralDBService dbServiceMock = new MockDbServiceBuilder().build(); + ConfigResourceNode configResourceNode = new ConfigResourceNode(dbServiceMock); + contextMock.setAttribute("template-model-id", "testModelId"); + contextMock.setAttribute("vnfc-type", "testVnfcType"); + configResourceNode.getVnfcReference(inParams, contextMock); verify(contextMock).setAttribute(anyString(), eq(AppcDataServiceConstant.OUTPUT_STATUS_SUCCESS)); } |