public void NotifiesExtensions_WhenGuardIsNotMet()
        {
            var extension = A.Fake <IExtension <States, Events> >();

            this.ExtensionHost.Extension = extension;

            IGuardHolder guard = Builder <States, Events> .CreateGuardHolder().ReturningFalse().Build();

            this.Testee.Guard = guard;

            this.Testee.Fire(this.TransitionContext);

            A.CallTo(() => extension.SkippedTransition(
                         this.StateMachineInformation,
                         A <ITransition <States, Events> > .That.Matches(t => t.Source == this.Source && t.Target == this.Target),
                         this.TransitionContext)).MustHaveHappened();
        }
 public GuardBuilder()
 {
     this.guardHolder = A.Fake <IGuardHolder>();
 }
 public TransitionInfo(TEvent eventId, IState <TState, TEvent> source, IState <TState, TEvent> target, IGuardHolder guard, IEnumerable <IActionHolder> actions)
 {
     this.EventId = eventId;
     this.Source  = source;
     this.Target  = target;
     this.Guard   = guard;
     this.Actions = actions;
 }