def 'Batch of new cm handles provided'() {
given: 'A batch of new cm handles'
- def cmHandleStateMap = setupBatch('NEW')
- when: 'updating a batch of changes'
- objectUnderTest.updateCmHandleStateBatch(cmHandleStateMap)
+ def yangModelCmHandlesToBeCreated = setupBatch('NEW')
+ when: 'instantiating a batch of new cm handles'
+ objectUnderTest.initiateStateAdvised(yangModelCmHandlesToBeCreated)
then: 'new cm handles are saved using inventory persistence'
1 * mockInventoryPersistence.saveCmHandleBatch(_) >> {
args -> {
}
and: 'event service is called to publish events'
2 * mockLcmEventsService.publishLcmEvent(_, _, _)
-
}
def 'Batch of existing cm handles is updated'() {
def yangModelCmHandle2 = new YangModelCmHandle(id: 'cmhandle2', dmiProperties: [], publicProperties: [])
if ('NEW' == type) {
- return [(yangModelCmHandle1): ADVISED, (yangModelCmHandle2): ADVISED]
+ return [yangModelCmHandle1, yangModelCmHandle2]
}
if ('DELETED' == type) {