public void Report( IStateMachine<string, int> machine, IStateMachineReport<string, int> report) { "establish a state machine"._(() => machine = new PassiveStateMachine<string, int>()); "establish a state machine reporter"._(() => report = A.Fake<IStateMachineReport<string, int>>()); "when creating a report"._(() => machine.Report(report)); "it should call the passed reporter"._(() => A.CallTo(() => report.Report(A<string>._, A<IEnumerable<IState<string, int>>>._, A<Initializable<string>>._))); }
public void Report( IStateMachine <string, int> machine, IStateMachineReport <string, int> report) { "establish a state machine".x(() => machine = new PassiveStateMachine <string, int>()); "establish a state machine reporter".x(() => report = A.Fake <IStateMachineReport <string, int> >()); "when creating a report".x(() => machine.Report(report)); "it should call the passed reporter".x(() => A.CallTo(() => report.Report(A <string> ._, A <IEnumerable <IState <string, int> > > ._, A <Initializable <string> > ._))); }
public void Report( IAsyncStateMachine <string, int> machine, IStateMachineReport <string, int> report) { "establish a state machine".x(() => machine = new StateMachineDefinitionBuilder <string, int>() .WithInitialState("initial") .Build() .CreatePassiveStateMachine()); "establish a state machine reporter".x(() => report = A.Fake <IStateMachineReport <string, int> >()); "when creating a report".x(() => machine.Report(report)); "it should call the passed reporter".x(() => A.CallTo(() => report.Report(A <string> ._, A <IEnumerable <IStateDefinition <string, int> > > ._, A <string> ._)) .MustHaveHappened()); }
/// <summary> /// Creates a state machine report with the specified generator. /// </summary> /// <param name="reportGenerator">The report generator.</param> public void Report(IStateMachineReport <TState, TEvent> reportGenerator) { this.stateMachine.Report(reportGenerator); }
/// <summary> /// Creates a report with the specified generator. /// </summary> /// <param name="reportGenerator">The report generator.</param> public void Report(IStateMachineReport <TState, TEvent> reportGenerator) { Guard.AgainstNullArgument("reportGenerator", reportGenerator); reportGenerator.Report(this.ToString(), this.states.GetStates(), this.initialStateId); }
/// <summary> /// Creates a report with the specified generator. /// </summary> /// <param name="reportGenerator">The report generator.</param> public void Report(IStateMachineReport <TState, TEvent> reportGenerator) { Ensure.ArgumentNotNull(reportGenerator, "reportGenerator"); reportGenerator.Report(this.ToString(), this.states.GetStates(), this.initialStateId); }