- returnedCmHandlesWithData.keySet().size() == 1
- }
-
- def 'Combine two query results where #scenario.'() {
- when: 'two query results in the form of a map of NcmpServiceCmHandles are combined into a single query result'
- def result = objectUnderTest.combineCmHandleQueries(firstQuery, secondQuery)
- then: 'the returned result is the same as the expected result'
- result == expectedResult
- where:
- scenario | firstQuery | secondQuery || expectedResult
- 'two queries with unique and non unique entries exist' | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle] | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle] || ['PNFDemo': pnfDemoCmHandle]
- 'the first query contains entries and second query is empty' | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle] | [:] || [:]
- 'the second query contains entries and first query is empty' | [:] | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle] || [:]
- 'the first query contains entries and second query is null' | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle] | null || ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle]
- 'the second query contains entries and first query is null' | null | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle] || ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle]
- 'both queries are empty' | [:] | [:] || [:]
- 'both queries are null' | null | null || null