public void DefaultStateMachineName( PassiveStateMachine <string, int> machine, StateMachineNameReporter reporter) { "establish an instantiated passive state machine".x(() => machine = new StateMachineDefinitionBuilder <string, int>() .WithInitialState("initial") .Build() .CreatePassiveStateMachine()); "establish a state machine reporter".x(() => { reporter = new StateMachineNameReporter(); }); "when the state machine report is generated".x(() => machine.Report(reporter)); "it should use the type of the state machine as name for state machine".x(() => reporter.StateMachineName .Should().Be("Appccelerate.StateMachine.PassiveStateMachine<System.String,System.Int32>")); }
public void CustomStateMachineName( PassiveStateMachine <string, int> machine, StateMachineNameReporter reporter) { const string Name = "custom name"; "establish an instantiated passive state machine with custom name".x(() => machine = new StateMachineDefinitionBuilder <string, int>() .WithInitialState("initial") .Build() .CreatePassiveStateMachine(Name)); "establish a state machine reporter".x(() => { reporter = new StateMachineNameReporter(); }); "when the state machine report is generated".x(() => machine.Report(reporter)); "it should use custom name for state machine".x(() => reporter.StateMachineName .Should().Be(Name)); }