示例#1
0
 public static void SetUp()
 {
     controllerSpoof = new TurnstileControllerSpoof();
     turnstile       = new TurnstileFSM(controllerSpoof);
 }
示例#2
0
 public virtual void Coin(Turnstile name)
 {
     throw new FSMError("Coin", name.GetCurrentState());
 }
 //
 // responds to Pass event
 //
 public override void Pass(Turnstile name)
 {
     name.Lock();
     // change the state
     name.SetState(name.GetItsLockedState());
 }
示例#4
0
 // default event functions
 public virtual void Pass(Turnstile name)
 {
     throw new FSMError("Pass", name.GetCurrentState());
 }
 //
 // responds to Coin event
 //
 public override void Coin(Turnstile name)
 {
     name.Thankyou();
     // change the state
     name.SetState(name.GetItsUnlockedState());
 }