EnterState.sctunit 881 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package tests
  2. testclass EnterState for statechart EnterState {
  3. /* An entry without a specified entry point must enter the region through the default entry.
  4. */
  5. operation defaultEntry(){
  6. enter
  7. assert active(EnterState.r.A)
  8. raise e
  9. cycle
  10. assert active(EnterState.r.B.r.E)
  11. }
  12. /* An entry with a specified entry point must take the entry node with the specified name.
  13. */
  14. operation namedEntryThroughNamedTransition(){
  15. enter
  16. assert active(EnterState.r.A)
  17. raise f
  18. cycle
  19. assert active(EnterState.r.B.r.F)
  20. }
  21. /* An entry with a specified entry point that does not match any entry node by name must be taken through the default entry node.
  22. */
  23. operation namedEntryThroughDefaultTransition(){
  24. enter
  25. assert active(EnterState.r.A)
  26. raise g
  27. cycle
  28. assert active(EnterState.r.B.r.E)
  29. }
  30. }