
testgroup GuardedEntry for statechart GuardedEntry{
	
	test EntryNotTakenOnStatechartEnter { 
		
		assert guard == false
		
		enter
		
		assert active(GuardedEntry.main_region.A)
		assert done == false
		  
	} 

	test EntryTakenOnStatechartEnter 
	{  
		
		guard = true
		
		enter 
//		assert false "sctunit does not allow modifiing variables before entering the state machine!"
		
		assert active(GuardedEntry.main_region.A)
		assert done == true
	}   
	 
	test EntryTakenInTransition {
		
		enter 

		assert active(GuardedEntry.main_region.A)
		raise e
		cycle
		assert active(GuardedEntry.main_region.B)
		
		guard = true
		done = false
		raise e
		cycle
		assert active(GuardedEntry.main_region.A)
		assert done
	} 
		
	test EntryNotTakenInTransition { 

		enter

		assert active(GuardedEntry.main_region.A)
		raise e
		cycle
		assert active(GuardedEntry.main_region.B)
		
		guard = false
		done = false
		raise e
		cycle
		assert active(GuardedEntry.main_region.A)
		assert !done
	} 
		
}
	