Exemple #1
0
        public void DefaultStateMachineName(
            PassiveStateMachine <string, int> machine,
            StateMachineNameReporter reporter)
        {
            "establish an instantiated passive state machine"._(() =>
            {
                machine = new PassiveStateMachine <string, int>();
            });

            "establish a state machine reporter"._(() =>
            {
                reporter = new StateMachineNameReporter();
            });

            "when the state machine report is generated"._(() =>
                                                           machine.Report(reporter));

            "it should use the type of the state machine as name for state machine"._(() =>
                                                                                      reporter.StateMachineName
                                                                                      .Should().Be("Appccelerate.StateMachine.PassiveStateMachine<System.String,System.Int32>"));
        }
Exemple #2
0
        public void CustomStateMachineName(
            PassiveStateMachine <string, int> machine,
            StateMachineNameReporter reporter)
        {
            const string Name = "custom name";

            "establish an instantiated passive state machine with custom name"._(() =>
            {
                machine = new PassiveStateMachine <string, int>(Name);
            });

            "establish a state machine reporter"._(() =>
            {
                reporter = new StateMachineNameReporter();
            });

            "when the state machine report is generated"._(() =>
                                                           machine.Report(reporter));

            "it should use custom name for state machine"._(() =>
                                                            reporter.StateMachineName
                                                            .Should().Be(Name));
        }