123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- /**
- * A shallow history must also for child states that are only indirectly entered through one of the childs.
- */
- testclass ShallowHistoryWithDeepEntry for statechart ShallowHistoryWithDeepEntry{
- @Test
- operation noDeepEntryWithinHistory(){
- enter
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toZ
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A)
-
- raise toY
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toZ
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A)
-
- }
-
- @Test
- operation deepEntryWithinHistory(){
- enter
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toZ
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A)
-
- raise toC
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C)
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B)
-
- raise toY
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toZ
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C)
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B)
-
- }
- @Test
- operation directDeepEntryIntoHistory(){
- enter
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toC
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C)
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B)
-
- raise toY
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Y)
-
- raise toZ
- proceed 1 cycle
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C)
- assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B)
-
- }
- }
-
|