def result = objectUnderTest.toYangModelSubscriptionEvent(testEventToMap)
then: 'the resulting yang model subscription event contains the correct clientId'
assert result.clientId == "SCO-9989752"
- and: 'client name'
+ and: 'subscription name'
assert result.subscriptionName == "cm-subscription-001"
and: 'is tagged value is false'
assert !result.isTagged
assert result.topic == null
}
+ def 'Map empty subscription event to yang model subscription event'() {
+ given: 'a new Subscription Event with no data'
+ def testEventToMap = new SubscriptionEvent()
+ when: 'the event is mapped to a yang model subscription'
+ def result = objectUnderTest.toYangModelSubscriptionEvent(testEventToMap)
+ then: 'the resulting yang model subscription event contains null clientId'
+ assert result.clientId == null
+ and: 'subscription name is null'
+ assert result.subscriptionName == null
+ and: 'is tagged value is false'
+ assert result.isTagged == false
+ and: 'predicates is null'
+ assert result.predicates == null
+ and: 'the topic is null'
+ assert result.topic == null
+ }
}
\ No newline at end of file