InEventLifeCycle.sctunit 492 B

1234567891011121314151617181920212223
  1. /**
  2. * @author axel terfloth
  3. */
  4. testclass InEventLifeCycle for statechart InEventLifeCycle {
  5. /** TODO: we require a probe interface for white box testing */
  6. @Test
  7. operation eventLifeCycle(){
  8. enter
  9. raise e
  10. // assert e // the in event must be set before the cycle
  11. assert i == 0 // e is not consumed yet
  12. proceed 1 cycle
  13. // assert ! e // after the cycle the event is not available anymore
  14. assert i == 1 // within the cycle the in event was consumed
  15. }
  16. }