/** * 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) } }