summaryrefslogtreecommitdiffstats
path: root/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy')
-rw-r--r--src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy
index c71f6d92..724d2d4e 100644
--- a/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy
+++ b/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021-2022 Nordix Foundation
- * Modifications Copyright (C) 2021 Bell Canada
+ * Modifications Copyright (C) 2021-2022 Bell Canada
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -117,19 +117,14 @@ class SdncOperationsSpec extends Specification {
1 * mockSdncRestClient.httpOperationWithJsonData(HttpMethod.POST, expectedUrl, 'some-json-data', _ as HttpHeaders)
}
- def 'Get resource data from node to SDNC. with#scenario accept header'() {
+ def 'Get resource data from node to SDNC.'() {
given: 'expected url, topology-id, sdncOperation object'
def expectedUrl = '/rests/data/network-topology:network-topology/topology=test-topology/node=node1/yang-ext:mount/testResourceId?a=1&b=2&content=testContent'
when: 'called get modules from node'
objectUnderTest.getResouceDataForOperationalAndRunning('node1', 'testResourceId',
- '(a=1,b=2)', acceptParamInHeader, 'content=testContent')
- then: 'the get operation is executed with the correct URL and Http headers'
- 1 * mockSdncRestClient.getOperation(expectedUrl, expectedHttpHeaders)
- where:
- scenario | acceptParamInHeader || expectedHttpHeaders
- 'test' | 'test' || new HttpHeaders([Accept:'test'])
- 'empty' | '' || new HttpHeaders()
- 'null' | null || new HttpHeaders()
+ '(a=1,b=2)', 'content=testContent')
+ then: 'the get operation is executed with the correct URL'
+ 1 * mockSdncRestClient.getOperation(expectedUrl)
}
def 'Write resource data with #scenario operation to SDNC.'() {