public static void SetUp() { controllerSpoof = new TurnstileControllerSpoof(); turnstile = new TurnstileFSM(controllerSpoof); }
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()); }
// 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()); }