EnterState.sctunit 811 B

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