diff options
author | Sourabh Sourabh <sourabh.sourabh@est.tech> | 2024-02-01 16:57:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-02-01 16:57:22 +0000 |
commit | 90b28d4b0eb228fd5906dabc50e1b543f1e3afed (patch) | |
tree | 88f1f6cf709b86af158ecdcbea893454786e8504 /integration-test/src/test | |
parent | 0f6f416f45d5ad0e9bba67d459858995196f7a73 (diff) | |
parent | 04280e2f93bbf30e8654c411bb1e107d275c22bb (diff) |
Merge "Extend API: Get Module Definitions"
Diffstat (limited to 'integration-test/src/test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsModuleServiceIntegrationSpec.groovy | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsModuleServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsModuleServiceIntegrationSpec.groovy index cf0e0b5944..8029ae0428 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsModuleServiceIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsModuleServiceIntegrationSpec.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation + * Copyright (C) 2023-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. @@ -21,7 +21,6 @@ package org.onap.cps.integration.functional import org.onap.cps.api.CpsModuleService -import org.onap.cps.api.impl.CpsModuleServiceImpl import org.onap.cps.integration.base.FunctionalSpecBase import org.onap.cps.spi.CascadeDeleteAllowed import org.onap.cps.spi.exceptions.AlreadyDefinedException @@ -153,6 +152,17 @@ class CpsModuleServiceIntegrationSpec extends FunctionalSpecBase { result == [new ModuleDefinition('stores','2020-09-15','')] } + def 'Retrieving module definitions: #scenarios'() { + when: 'module definitions for module name are retrieved' + def result = objectUnderTest.getModuleDefinitionsByAnchorAndModule(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, moduleName, moduleRevision) + then: 'the correct module definitions are returned' + result == [new ModuleDefinition('stores','2020-09-15','')] + where: 'following parameters are used' + scenarios | moduleName | moduleRevision + 'both specified' | 'stores' | '2020-09-15' + 'module name specified' | 'stores' | null + } + def 'Retrieving yang resource module references by anchor.'() { when: 'the yang resource module references for an anchor are retrieved' def result = objectUnderTest.getYangResourcesModuleReferences(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1) |