- scenario | dmiProperties | unknownModuleReferences || expectedAdditionalPropertiesInRequest | expectedModuleReferencesInRequest
- 'with module references and properties' | [yangModelCmHandleProperty] | newModuleReferences || '{"prop1":"val1"}' | '{"name":"mod1","revision":"A"},{"name":"mod2","revision":"X"}'
- 'without module references' | [yangModelCmHandleProperty] | [] || '{"prop1":"val1"}' | ''
- 'without properties' | [] | newModuleReferences || '{}' | '{"name":"mod1","revision":"A"},{"name":"mod2","revision":"X"}'
+ scenario | dmiProperties || expectedAdditionalPropertiesInRequest
+ 'with module references and properties' | [yangModelCmHandleProperty] || '{"prop1":"val1"}'
+ 'without properties' | [] || '{}'
+ }
+
+ def 'Retrieving yang resources from DMI with no module references.'() {
+ given: 'a cm handle'
+ mockYangModelCmHandleRetrieval([])
+ when: 'a get new yang resources from DMI is called with no module references'
+ def result = objectUnderTest.getNewYangResourcesFromDmi(yangModelCmHandle, [])
+ then: 'no resources are returned'
+ assert result == [:]
+ and: 'no request is sent to DMI'
+ 0 * mockDmiRestClient.postOperationWithJsonData(*_)