summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test
diff options
context:
space:
mode:
authorJosephKeenan <joseph.keenan@est.tech>2021-12-14 12:25:21 +0000
committerJosephKeenan <joseph.keenan@est.tech>2021-12-15 10:17:40 +0000
commit905d361fb7dd5a433ebf4666d091fd9c8f521fa7 (patch)
tree2dd00f08b062ffecaa368b057c7af48591a7777e /cps-ncmp-service/src/test
parentb7485757b6fd56c2b32cd90c5ad1d0b5bd7b3a6a (diff)
Adding unit tests and robuestness for DMI registration
-Added more scenarios for combinations of plugins -Made plugin registration more robust Issue-ID: CPS-736 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I7495eb802fec8708e7ea6b0a97a9d7fe4676c8c1
Diffstat (limited to 'cps-ncmp-service/src/test')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy14
1 files changed, 9 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy
index 8c3e593da1..304c08ae8d 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy
@@ -170,11 +170,15 @@ class NetworkCmProxyDataServiceImplRegistrationSpec extends Specification {
and: 'registration is not called'
0 * objectUnderTest.parseAndCreateCmHandlesInDmiRegistrationAndSyncModules(dmiPluginRegistration)
where:
- scenario | dmiPlugin | dmiModelPlugin | dmiDataPlugin || expectedMessageDetails
- 'no DMI plugin' | '' | '' | '' || 'No DMI plugin service names'
- 'all DMI plugins' | 'service1' | 'service2' | 'service3' || 'Invalid combination of plugin service names'
- 'no model DMI plugin' | 'service1' | '' | 'service2' || 'Invalid combination of plugin service names'
- 'no data DMI plugin' | 'service1' | 'service2' | '' || 'Invalid combination of plugin service names'
+ scenario | dmiPlugin | dmiModelPlugin | dmiDataPlugin || expectedMessageDetails
+ 'empty DMI plugins' | '' | '' | '' || 'No DMI plugin service names'
+ 'blank DMI plugins' | ' ' | ' ' | ' ' || 'No DMI plugin service names'
+ 'null DMI plugins' | null | null | null || 'No DMI plugin service names'
+ 'all DMI plugins' | 'service1' | 'service2' | 'service3' || 'Cannot register combined plugin service name and other service names'
+ '(combined)DMI and Data Plugin' | 'service1' | '' | 'service2' || 'Cannot register combined plugin service name and other service names'
+ '(combined)DMI and model Plugin'| 'service1' | 'service2' | '' || 'Cannot register combined plugin service name and other service names'
+ 'only model DMI plugin' | '' | 'service1' | '' || 'Cannot register just a Data or Model plugin service name'
+ 'only data DMI plugin' | '' | '' | 'service1' || 'Cannot register just a Data or Model plugin service name'
}
def getObjectUnderTestWithModelSyncDisabled() {