osgi-test icon indicating copy to clipboard operation
osgi-test copied to clipboard

[assertj,cm] Assertions and Conditions on CofigurationEvent

Open stbischof opened this issue 1 year ago • 3 comments

stbischof avatar Feb 06 '24 23:02 stbischof

@timothyjward

Could you give me your general thoughts on that.

stbischof avatar Feb 06 '24 23:02 stbischof

@timothyjward I am Ready with this PR

Here are some examples of how the conditions we publish could describe a Assert-Result:

[✓] pid is <null>


[✗] pid is <null> was <thePid>


[✓] all of:[
   [✓] type is <CM_UPDATED>,
   [✓] factoryPid equals <theFactoryPid>
]


[✗] all of:[
   [✓] type is <CM_UPDATED>,
   [✗] factoryPid equals <otherFactoryPid> was <theFactoryPid>
]


[✗] all of:[
   [✗] type is <CM_DELETED> was <CM_UPDATED>,
   [✓] factoryPid equals <theFactoryPid>
]


[✓] factoryPid is <null>


[✗] factoryPid is <null> was <theFactoryPid>


[✓] type is <CM_UPDATED>


[✗] type is <CM_UPDATED> was <CM_DELETED>


[✓] any of:[
   [✗] all of:[
      [✗] not :<pid is <null>>,
      [✓] pid equals <null>
   ],
   [✓] all of:[
      [✓] not :<factoryPid is <null> was <theFactoryPid>>,
      [✓] factoryPid equals <theFactoryPid>
   ]
]


[✓] any of:[
   [✓] all of:[
      [✓] not :<pid is <null> was <thePid>>,
      [✓] pid equals <thePid>
   ],
   [✗] all of:[
      [✗] not :<factoryPid is <null>>,
      [✓] factoryPid equals <null>
   ]
]


[✗] any of:[
   [✗] all of:[
      [✗] not :<pid is <null>>,
      [✓] pid equals <null>
   ],
   [✗] all of:[
      [✓] not :<factoryPid is <null> was <otherFactoryPid>>,
      [✗] factoryPid equals <theFactoryPid> was <otherFactoryPid>
   ]
]


[✗] any of:[
   [✗] all of:[
      [✓] not :<pid is <null> was <otherPid>>,
      [✗] pid equals <thePid> was <otherPid>
   ],
   [✗] all of:[
      [✗] not :<factoryPid is <null>>,
      [✓] factoryPid equals <null>
   ]
]


[✓] factoryPid equals <theFactoryPid>


[✗] factoryPid equals <theFactoryPid> was <otherFactoryPid>


[✗] factoryPid equals <theFactoryPid> was <null>


[✓] factoryPid equals <thePid>


[✗] factoryPid equals <thePid> was <otherPid>

[✗] factoryPid equals <thePid> was <null>

[✓] all of:[
   [✓] type is <CM_UPDATED>,
   [✓] pid equals <thePid>
]


[✗] all of:[
   [✓] type is <CM_UPDATED>,
   [✗] pid equals <otherPid> was <thePid>
]


[✗] all of:[
   [✗] type is <CM_DELETED> was <CM_UPDATED>,
   [✓] pid equals <thePid>
]

stbischof avatar Feb 09 '24 09:02 stbischof